From warnes@biostat.washington.edu  Fri Mar 24 19:26:18 2000
From: warnes@biostat.washington.edu (warnes@biostat.washington.edu)
Date: Fri, 24 Mar 2000 20:26:18 +0100 (MET)
Subject: [Rd] dmvnorm() bug in e1071 (PR#503)
Message-ID: <200003241926.UAA06290@pubhealth.ku.dk>


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] dmvnorm() bug in e1071 (PR#503)
warnes@biostat.washington.edu