[R-sig-Geo] simulated rasters?

Agustin Lobo alobolistas at gmail.com
Fri Jun 3 18:36:30 CEST 2011


Hi!

Could raster inherit from grf objects (package geoR)?
It would be useful to generate simulated raster fields.Or perhpas is there
a way of doing this with another package?
> sim <- grf(441, grid="reg", cov.pars=c(1, .25), nsim=4)
> simr = raster(sim)
Error in function (classes, fdef, mtable)  :
  unable to find an inherited method for function "raster", for signature "grf"

By now I use
> a = (sim$data)
> dim(a) <- c(21,21)
> simr = raster(t(a)[21:1,])

Thanks,

Agus



More information about the R-sig-Geo mailing list