Description Usage Arguments Value Note Author(s)
Check if a R
object or a filename correspond to a valid Raster
object, to a raster file or none of the above. Useful to detect which kind
of input is passed to a function and abort / do something in the case of
"wrong" input.
1 | get_rastype(in_rast, abort = TRUE)
|
in_rast |
name of an |
abort |
If TRUE, and |
character
equal to "rastfile" (if in_rast
is a raster file),
rastobject
(if in_rast
is a R
raster object) or NA
if it is
neither (unless abort
== TRUE)
Functions get_spatype, get_rastype and get_vectype come from package sprawl.
Lorenzo Busetto, phD (2017) lbusett@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.