function to automatically re-cast between Raster object and raster files on disk
1 2 3 4 5 6 7 8 9 10
object is a valid
R spatial object, it is automatically converted to an object of
a different class if needed (e.g., from
Spatial and viceversa, or from
sf to a
vector file through
sprawl::write_shape). If it is a character string, the function checks if
it corresponds to a valid raster file and reads it to a
Raster object through
returns the same object, casted to the "class" specified by
to (or the exact same
object in case
object is already of "class"
Lorenzo Busetto, phD (2017) [email protected]
1 2 3 4
## Not run: #EXAMPLE1 ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.