Hello all, 

I cant find a thread with a problem similar to mine. I am trying to create a
random fields and I get the same error:

library(geoR)
N<-10
nslon<-250
nslat<-250
range<-10
sim2 <- grf(nslon*nslat, grid="reg", nx=nslon, ny=nslat,cov.pars=c(1,
range), 
              nsim=N, cov.model = "exponential",
              xlims=c(30.02,35.00),ylims=c(30.02,35.00) )

Error in FUN(X[[1L]], ...) : 
  different grid distances detected, but the grid must have equal distances
in each direction -- try gridtriple=TRUE that avoids numerical errors.

 I can't understand why as the code seems to run if I change the limits of
the grid:

sim2 <- grf(nslon*nslat, grid="reg", nx=nslon, ny=nslat,cov.pars=c(1,
range), 
              nsim=N, cov.model = "exponential",
              xlims=c(0.02,5.00),ylims=c(0.02,5.00) )

Any ideas?

Best 
Ioanna

______________________________________________
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.

Reply via email to