maddy wrote: > > I did not understand what you mean by updating the system. I am new > user of R and I downloaded R a few days ago. Also I installed the > required packages for my program(geoR, randomFields), there was just > one version I could see for the packages. > The code I am using is as follows > > .Random.seed<-1 > N<-300 > phi <- 0.25 > > get_spherical_map <- function(N,phi) { > > sim<-grf(N*N,grid="reg",cov.model="spherical",cov.pars=c(1,phi),method="RF") > sim$data <- (sim$data - mean(sim$data)) / sd(sim$data) > local <- array(sim$data, dim=c(N,N)) > } > >
You should check the posting guide on http://www.r-project.org/posting-guide.html The output of sessionInfo() is important. The above code is helpful, because we see that the problem comes from a call to grf, but it does not show the error. Since your data set probably is large, best construct a dummy data set, or better, use some standard data set as it comes with grf to show the error. Dieter -- View this message in context: http://n4.nabble.com/the-error-in-DoSimulateRF-function-tp1592572p1592630.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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.