Hi, I get the following error meassage: -------------------------------------------------- rcorr(lskPox0t30[c(22,3:7)], type=c("spearman")) Error in "[<-.data.frame"(*tmp*, is.na(x), value = 1e+30) : matrix subscripts not allowed in replacement -------------------------------------------------- But I do not know how to solve it? Another problem could be NAs in the data. How can I over come this problem if I would like to omit NAs like use="pairwise.complete.obs"? Regards, Ulrich -- __________________________________________________ Ulrich Leopold MSc. Department of Physical Geography Institute for Biodiversity and Ecosystem Dynamics Faculty of Science University of Amsterdam Nieuwe Achtergracht 166 NL-1018WV Amsterdam Phone: +31-(0)20-525-7456 (7451 Secretary) Fax: +31-(0)20-525-7431 Email: uleopold at science.uva.nl http://www.frw.uva.nl/soil/Welcome.html Check us also out at: Netherlands Centre for Geo-ecological Research http://www.frw.uva.nl/icg -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
sorry this was an unwanted post as I did post it already some days ago. Ulrich Ulrich Leopold wrote:> Hi, > > I get the following error meassage: > > -------------------------------------------------- > rcorr(lskPox0t30[c(22,3:7)], type=c("spearman")) > Error in "[<-.data.frame"(*tmp*, is.na(x), value = 1e+30) : > matrix subscripts not allowed in replacement > -------------------------------------------------- > > But I do not know how to solve it? Another problem could be NAs in the > data. How can I over come this problem if I would like to omit NAs like > use="pairwise.complete.obs"? > > Regards, Ulrich >-- __________________________________________________ Ulrich Leopold MSc. Department of Physical Geography Institute for Biodiversity and Ecosystem Dynamics Faculty of Science University of Amsterdam Nieuwe Achtergracht 166 NL-1018WV Amsterdam Phone: +31-(0)20-525-7456 (7451 Secretary) Fax: +31-(0)20-525-7431 Email: uleopold at science.uva.nl http://www.frw.uva.nl/soil/Welcome.html Check us also out at: Netherlands Centre for Geo-ecological Research http://www.frw.uva.nl/icg -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Did you not see the solution to this from someone else last week? rcorr uses pairwise deletion of NAs. Frank Harrell On Mon, 09 Sep 2002 10:35:52 +0200 Ulrich Leopold <uleopold at science.uva.nl> wrote:> Hi, > > I get the following error meassage: > > -------------------------------------------------- > rcorr(lskPox0t30[c(22,3:7)], type=c("spearman")) > Error in "[<-.data.frame"(*tmp*, is.na(x), value = 1e+30) : > matrix subscripts not allowed in replacement > -------------------------------------------------- > > But I do not know how to solve it? Another problem could be NAs in the data. > How can I over come this problem if I would like to omit NAs like > use="pairwise.complete.obs"? > > Regards, Ulrich > > -- > __________________________________________________ > > Ulrich Leopold MSc. > > Department of Physical Geography > Institute for Biodiversity and Ecosystem Dynamics > Faculty of Science > University of Amsterdam > Nieuwe Achtergracht 166 > NL-1018WV Amsterdam > > Phone: +31-(0)20-525-7456 (7451 Secretary) > Fax: +31-(0)20-525-7431 > Email: uleopold at science.uva.nl > http://www.frw.uva.nl/soil/Welcome.html > > Check us also out at: > Netherlands Centre for Geo-ecological Research > http://www.frw.uva.nl/icg > > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-- Frank E Harrell Jr Prof. of Biostatistics & Statistics Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Ulrich, At 10:35 AM 9/9/2002 +0200, Ulrich Leopold wrote:>I get the following error meassage: > >-------------------------------------------------- >rcorr(lskPox0t30[c(22,3:7)], type=c("spearman")) >Error in "[<-.data.frame"(*tmp*, is.na(x), value = 1e+30) : > matrix subscripts not allowed in replacement >-------------------------------------------------- > >But I do not know how to solve it? Another problem could be NAs in the >data. How can I over come this problem if I would like to omit NAs like >use="pairwise.complete.obs"?It looks as if you omitted a comma after the row indices; rcorr(lskPox0t30[c(22,3:7),], type=c("spearman")) should do the trick. I believe that rcorr will give you pairwise-present observations by default. John ----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: jfox at mcmaster.ca phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox ----------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._