polzehl@wias-berlin.de
2000-Jan-27 16:12 UTC
handling of dimension-attribute in density (PR#406)
Full_Name: Joerg Polzehl Version: 0.90.1 OS: Digital UNIX V4.0F Submission from: (NULL) (192.124.249.126) The dimension attribute in function density is not handled correctly (or at least differently from S) : z_rnorm(1000) dim(z)_c(10,10,10) plot(density(z),type="l") # no problem plot(density(z[1,,]),type="l") # Error in if (!(lo <- min(hi, IQR(x)/1.34))) (lo <- hi) # || (lo <- abs(x[1])) || : missing value where logical # needed # In addition: Warning message: # NaNs produced in: sqrt(var(x, na.rm = na.rm)) ######## x probably is still a matrix in the call of var() ######## plot(density(as.vector(z[1,,])),type="l") # again no problem -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
2000-Jan-27 17:12 UTC
handling of dimension-attribute in density (PR#406)
polzehl@wias-berlin.de writes:> ######## x probably is still a matrix in the call of var() ########Exactly. Do we fix sd() or density() or both? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian Ripley
2000-Jan-27 17:21 UTC
handling of dimension-attribute in density (PR#406)
> From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> > Date: 27 Jan 2000 18:12:21 +0100 > > polzehl@wias-berlin.de writes: > > > ######## x probably is still a matrix in the call of var() ######## > > Exactly. Do we fix sd() or density() or both?Both. density needs an x <- as.vector(x), and I think sd needs to return the standard deviation*s* if given a matrix or data frame. Its current behaviour is wrong. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
p.dalgaard@biostat.ku.dk
2000-Jan-27 18:09 UTC
handling of dimension-attribute in density (PR#406)
Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:> Both. density needs an x <- as.vector(x), and I think sd needs > to return the standard deviation*s* if given a matrix or data frame.!! You mean column-wise?> Its current behaviour is wrong.-- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._