[R-sig-Geo] problem with expand function (raster package)
Julian Burgos
julian at hafro.is
Mon May 7 13:47:58 CEST 2012
Sorry, posted to the wrong list.
On mán 7.maí 2012 11:44, Julian Burgos wrote:
> Dear list,
>
> I cannot figure this out. I am trying to extend a raster object,
> using the "extend" function (from the raster package), but the
> extension of the raster does not change. Here is an example:
>
> ##############################
> set.seed(100)
> myraster <- raster(ncols=4, nrows=4)
> myraster[] <- sample(1:10,ncell(eff),replace=T)
> extent(myraster)
>
> ex <- extent(myraster)+2
> eff <- expand(myraster, ex)
> extent(myraster)
> ##############################
>
> As you can see, the extent of "myraster" does not change. What I am
> doing wrong?
> Many thanks,
>
> Julian
>
--
Julian Mariano Burgos, PhD
Hafrannsóknastofnunin/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax: +354-5752001
Netfang/Email: julian at hafro.is
More information about the R-sig-Geo
mailing list