Kenn Konstabel wrote:
I'm not an expert at all, but isn't it that you really want svd(x)$u to
be different (instead of V)?
that would be easy to do:
x <- matrix(rnorm(15), 3, 5)
s1 <- svd(x)
s2 <- svd(x, nv=ncol(x))
x1 <- s1$u %*% diag(s1$d) %*% t(s1$v)
x2 <- cbind(s2$u,1,1) %*% diag(c(s1$d,0,0)) %*% t(s2$v)
all.equal(x,x1,x2)
Yep, you're absolutely correct. As someone's explained to me, the number
of PCs cannot be larger than the rank of the matrix, therefore like you
say the rest of the eigenvalues are practically zero anyway.
Thanks,
Gad
--
Gad Abraham
Dept. CSSE and NICTA
The University of Melbourne
Parkville 3010, Victoria, Australia
email: [EMAIL PROTECTED]
web: http://www.csse.unimelb.edu.au/~gabraham
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.