rmf_as_array.Raster | R Documentation |
Convert a raster object to rmf_array
## S3 method for class 'Raster' rmf_as_array(obj, dis, ...)
obj |
object of class |
dis |
|
... |
additional arguments passed to |
obj
is first converted to stars
using stars::st_as_stars
. rmf_as_array.stars
is called on the resulting stars
object.
a rmf_2d_array
or rmf_3d_array
depending on the dimensions of obj
dis <- rmf_create_dis() r <- raster::raster(matrix(1:prod(dis$nrow, dis$ncol), 10, 10), xmx = sum(dis$delr), ymx = sum(dis$delc)) rmf_as_array(r, dis, resample = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.