[R] Error in vector("double", length)

From: Kumudan <cybermails_at_gmail.com>
Date: Fri, 25 Jul 2008 16:18:21 -0500


Please see the code below.
When I try to run the variogram - vg.deft<-variog(rd,uvec=10) I keep getting this errorvariog:
 computing omnidirectional variogram
Error in vector("double", length) : vector size specified is too large

Also, when I try to define distance-based neighborhood - nb.tr=dist.neighbors(tr.locs,2)
I get this error -
Error in vector("double", length) : vector size cannot be NA In addition: Warning message:
NAs produced by integer overflow in: n * n



#Code:
library(geoR)#for variograms and kriging
library(akima)#for interp
library(fields)#for plot.surface
library(spatstat)
library(spdep)

#transform coordinates in kilometers, and redefine origin
newx=(xcoord-min(xcoord))/1000
newy=(ycoord-min(ycoord))/1000
plot(newx,newy,pch=20,xlab="X coordinate (km)",ylab="Y coordinate (km)")

#set of new locations to be used from here on
tr.locs=cbind(newx,newy)

#transform proportions using an angular transformation
rel.tr=asin(sqrt(rel_dom/100))

#set as geodata

rd<-as.geodata(cbind(tr.locs, rel.tr))

#calculate empirical variogram

vg.deft<-variog(rd,uvec=10)

#define distance-based neighborhood based on function written in separate code
nb.tr=dist.neighbors(tr.locs,2)


My data has over 78,000 rows of data. I'm using R 2.2.1 on Windows XP professional, 2 GB RAM, Core2Duo 2.13 GHz Can someone please help me find a solution to my problem? Please let me know if you need any other information.

Thanks,
Kumudan



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. Received on Fri 25 Jul 2008 - 21:21:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jul 2008 - 21:32:59 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive