[R] matrix "Adjoint" function
Thomas Lumley
tlumley at u.washington.edu
Mon Aug 28 22:16:39 CEST 2006
On Mon, 28 Aug 2006, Jessica M. Maia wrote:
> Sorry but I wasn't very clear in my previous message.
>
> I want to compute the adjoint of a real matrix A,
> which is the transpose of the cofactor matrix of A.
>
> There is an example here: http://www.mathwords.com/a/adjoint.htm
>
> Does R have a function which will compute the cofactor of
> matrix A or the adjoint of a real matrix A?
If that's what you mean by adjoint, then the adjoint is the inverse
multiplied by the determinant.
adjoint<-function(A) det(A)*solve(A)
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
More information about the R-help
mailing list