Robert Guldemond
2011-Mar-03 13:44 UTC
[R] vector("integer", length) : vector size specified is too large
Good day to the R community, I am interested to run the plot.count() function in the "untb" package. My script is as follows:-> library(untb)> Community1 <-> structure(c(371,167,119,78,74,53,50,31,28,25,20,19,19,17,13,12,12,10,> 9,9,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,> 1,1,1,1,1,1,1,1), .Dim = 60, .Dimnames list(c("Spp.80","Spp.111","Spp.129",>"Spp.101","Spp.40","Spp.11","Spp.14","Spp.128","Spp.58","Spp.103","Spp.112",> "Spp.50","Spp.115","Spp.31","Spp.86","Spp.92","Spp.108","Spp.79","Spp.81",> "Spp.110","Spp.75","Spp.83","Spp.30","Spp.62","Spp.63","Spp.76","Spp.27",> "Spp.87","Spp.102","Spp.121","Spp.22","Spp.33","Spp.67","Spp.109","Spp.1",> "Spp.10","Spp.18","Spp.12","Spp.47","Spp.114","Spp.8","Spp.42","Spp.65",>"Spp.69","Spp.100","Spp.106","Spp.130","Spp.38","Spp.43","Spp.56","Spp.82",>"Spp.93","Spp.95","Spp.107","Spp.116","Spp.117","Spp.118","Spp.119","Spp.136 ",> "Spp.144")), class = c("count", "table"))> Community1> summary(unphi(phi(Community1)))> plot.count(Community1,uncertainty=TRUE,expectation=TRUE,theta=NULL,n=10)When I run this I get the following message:- Error in vector("integer", length) : vector size specified is too large In addition: Warning message: In parts(J) : NAs introduced by coercion Does anyone have any ideas for me why I get these error messages and what I should do to overcome this challenge? Thank you in advance Rob Guldemond ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Research Scientist Conservation Ecology Research Unit Department of Zoology and Entomology University of Pretoria Pretoria 0002 South Africa tel: (+27) 12 420 3231 fax: (+27) 12 420 4523 cell: (+27) 83 770 9694 rguldemond@zoology.up.ac.za <http://www.ceru.up.ac.za> http://www.ceru.up.ac.za ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [[alternative HTML version deleted]]
Uwe Ligges
2011-Mar-04 09:51 UTC
[R] vector("integer", length) : vector size specified is too large
Please ask the author of parts() in the partitions package or the author of the function that calls the former: your function calls generate a call parts(J) where J is 1272. Internally, a J*P(J) (1272 * 1.514126e+19) vector is generated (and that one is too large for R). Uwe Ligges On 03.03.2011 14:44, Robert Guldemond wrote:> Good day to the R community, > > > > I am interested to run the plot.count() function in the "untb" package. > > My script is as follows:- > > > >> library(untb) > >> Community1<- > >> structure(c(371,167,119,78,74,53,50,31,28,25,20,19,19,17,13,12,12,10, > >> 9,9,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1, > >> 1,1,1,1,1,1,1,1), .Dim = 60, .Dimnames > list(c("Spp.80","Spp.111","Spp.129", > >> > "Spp.101","Spp.40","Spp.11","Spp.14","Spp.128","Spp.58","Spp.103","Spp.112", > >> "Spp.50","Spp.115","Spp.31","Spp.86","Spp.92","Spp.108","Spp.79","Spp.81", > >> "Spp.110","Spp.75","Spp.83","Spp.30","Spp.62","Spp.63","Spp.76","Spp.27", > >> "Spp.87","Spp.102","Spp.121","Spp.22","Spp.33","Spp.67","Spp.109","Spp.1", > >> "Spp.10","Spp.18","Spp.12","Spp.47","Spp.114","Spp.8","Spp.42","Spp.65", > >> > "Spp.69","Spp.100","Spp.106","Spp.130","Spp.38","Spp.43","Spp.56","Spp.82", > >> > "Spp.93","Spp.95","Spp.107","Spp.116","Spp.117","Spp.118","Spp.119","Spp.136 > ", > >> "Spp.144")), class = c("count", "table")) > >> Community1 > >> summary(unphi(phi(Community1))) > >> plot.count(Community1,uncertainty=TRUE,expectation=TRUE,theta=NULL,n=10) > > > > When I run this I get the following message:- > > > > Error in vector("integer", length) : vector size specified is too large > > In addition: Warning message: > > In parts(J) : NAs introduced by coercion > > > > Does anyone have any ideas for me why I get these error messages and what I > should > > do to overcome this challenge? > > > > Thank you in advance > > > > Rob Guldemond > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Research Scientist > Conservation Ecology Research Unit > Department of Zoology and Entomology > University of Pretoria > Pretoria > 0002 > South Africa > tel: (+27) 12 420 3231 > fax: (+27) 12 420 4523 > cell: (+27) 83 770 9694 > rguldemond at zoology.up.ac.za > <http://www.ceru.up.ac.za> http://www.ceru.up.ac.za > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.