[R] inverse of matrix made by low.tri function

kevinchang shukai at seas.upenn.edu
Wed Oct 3 17:43:26 CEST 2007


Hi all,


I am using R trying to get a inverse matrix of (X^T)X , but I keep getting
the error 
message like: no b argument and no default value for sprintf(gettext(fmt,
domain = domain), ...) .
--------------------------------------------------------------------------------------------
# my code

X<-Matrix(rep(1,500),100,5)
X[lower.tri(X)]<-1-10^-7
XtX<- t(X)%*% X
XtXu<-lu(XtX)
InverseXtX<-solve(XtXu)

---------------------------------------------------------------------------------------------

The cause suggested for this error is that the lower.tri function returns a
matrix of logicals. If so, is trying to fix this by using sprintf function a
good idea ? Or is there is any alternative way to get the inverse matrix?
Please help. Thanks

-- 
View this message in context: http://www.nabble.com/inverse-of-matrix-made-by-low.tri-function-tf4562543.html#a13021480
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list