[Rd] v matrix of svd(X) loses dimensions if nrow(X)==1 (PR#963)
Martin Maechler <email@example.com>
Fri, 1 Jun 2001 14:39:10 +0200
Marcel> Dear R-developers
Marcel> I'm not very sure whether this is really a bug and not a feature:
Marcel>  FALSE
Marcel> In all other cases the $v component is a matrix. Also, the $u
Marcel> component always seems to be a matrix as indicated in the doc.
It's the famous `programmer bug' of not using `` , drop = FALSE ''
when matrix subscripting in functions....
in the 2nd-to-last line of svd() :
if(nv && nv < p) z$v <- z$v[, 1:nv, drop = FALSE]
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: firstname.lastname@example.org