[Rd] dmvnorm() bug in e1071 (PR#503)
warnes@biostat.washington.edu
warnes@biostat.washington.edu
Fri, 24 Mar 2000 20:26:18 +0100 (MET)
When dmvnorm is applied to matrices it fails. The offending lines are
if (length(x) != ncol(sigma)) {
stop("x and sigma have non-conforming size")
}
which works fine if x is a dataframe, but not if x is a matrix.
Replacing this test with
if (ncol(x) != ncol(sigma)) {
stop("x and sigma have non-conforming size")
}
Corrects the problem, and still works for data frames and
vectors. (Vectors have already been converted to matrices).
-Gregory
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._