Czerminski, Ryszard
2002-Jun-19 18:23 UTC
[R] Error in inherits(x, "data.frame") : subscript out of bounds
Hi, I have this little problem with "dist" function and I cannot find anything matching in mail archives> o[,1] [,2] [,3] [1,] 1 0 3 [2,] 2 0 6 [3,] 3 0 9> dist(o)Error in inherits(x, "data.frame") : subscript out of bounds If you have any insights, which might illuminate R-neophyte... I would highly appreciate it. Truly yours, R Ryszard Czerminski phone: (781)994-0479 ArQule, Inc. email:ryszard at arqule.com 19 Presidential Way http://www.arqule.com Woburn, MA 01801 fax: (781)994-0679 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ripley@stats.ox.ac.uk
2002-Jun-19 18:40 UTC
[R] Error in inherits(x, "data.frame") : subscript out of bounds
On Wed, 19 Jun 2002, Czerminski, Ryszard wrote:> Hi, I have this little problem with "dist" function > and I cannot find anything matching in mail archives > > > o > [,1] [,2] [,3] > [1,] 1 0 3 > [2,] 2 0 6 > [3,] 3 0 9 > > dist(o) > Error in inherits(x, "data.frame") : subscript out of bounds > > If you have any insights, which might illuminate R-neophyte... > I would highly appreciate it.What version of R and dist is this? The version in the current R (package mva) does not include that line, and it works:> o <- matrix(c(1:3, rep(0,3), 3*(1:3)),3) > o[,1] [,2] [,3] [1,] 1 0 3 [2,] 2 0 6 [3,] 3 0 9> dist(o)1 2 2 3.162278 3 6.324555 3.162278 Try> conflicts("dist")-- Brian D. Ripley, ripley at 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-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._