[R] Error in grf using geoR

IOANNA ii54250 at msn.com
Tue Nov 12 11:41:26 CET 2013


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



More information about the R-help mailing list