maddy wrote: > > Thanks for the help. I was able to run the code by removing random seed > statement and putting > set.seed(1) >
And the full example is show below. Please, next time, post it immediately, and you will get an answer withing minutes, sometimes. Dieter library(geoR) .Random.seed<-1L # Make this an integer 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)) } # a "smallish" simulation pg30 - geoR documentation sim2 <- grf(441, grid = "reg", cov.pars = c(1, .25)) image(sim2) -- View this message in context: http://n4.nabble.com/the-error-in-DoSimulateRF-function-tp1592572p1593021.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.