[R] the error in DoSimulateRF function

Dieter Menne dieter.menne at menne-biomed.de
Sun Mar 14 19:44:59 CET 2010

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 


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.


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.

More information about the R-help mailing list