Description Usage Arguments Value See Also Examples
View source: R/is-type-grDevices.R
Checks to see if the input is a raster.
1 2 3 | assert_is_raster(x, severity = getOption("assertive.severity", "stop"))
is_raster(x, .xname = get_name_in_parent(x))
|
x |
Input to check. |
severity |
How severe should the consequences of the assertion be?
Either |
.xname |
Not intended to be used directly. |
is_raster
wraps is.raster
, providing more
information on failure. is_a_raster
returns TRUE
if the
input is raster and scalar. The assert_*
functions return nothing but
throw an error if the corresponding is_*
function returns
FALSE
.
1 2 3 4 5 6 7 | m <- matrix(hcl(0, 80, seq(50, 80, 10)), nrow=4, ncol=5)
assert_is_raster(as.raster(m))
## Not run:
#These examples should fail.
assert_is_raster(m)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.