is_raster_type: Test if an object is from 'raster' or 'terra' package

View source: R/raster.R

is_raster_typeR Documentation

Test if an object is from raster or terra package

Description

Test if an object is from raster or terra package

Usage

is_raster_type(x, klass = c("BasicRaster", "SpatRaster"))

Arguments

x

object to test

klass

character a vector of allowed class types. Use this to narrow the test, say for a brick by setting klasses to 'RasterBrick'

Value

logical, TRUE if the object inherits from the specified class


BigelowLab/rasf documentation built on July 18, 2022, 10:19 p.m.