Skip to contents

This function returns one of 'vector' or 'raster' depending on the input class.

Usage

datamod(input)

Arguments

input

Spat*/sf/stars object.

Value

character(1). One of "vector" or "raster".

Note

Although stars object is a little ambiguous whether to classify vector or raster, it will be considered raster in this package.

See also

Author

Insang Song

Examples

if (FALSE) { # \dontrun{
library(sf)
library(terra)
options(sf_use_s2 = FALSE)

nc_path <- system.file("gpkg/nc.gpkg", package = "sf")
nc_sf <- sf::st_read(nc_path)
datamod(nc_sf)

ra_path <- system.file("ex/elev.tif", package = "terra")
ra <- terra::rast(ra_path)
datamod(ra)
} # }