Learn R Programming

tenm (version 0.5.1)

metaras: Helper function to obtain layer name from a raster layer

Description

Returns a character vector with the name of the raster layer.

Usage

metaras(r)

Value

A character vector with the name of the raster layer.

Arguments

r

An object of class SpatRaster representing the raster layer.

Examples

Run this code
tempora_layers_dir <- system.file("extdata/bio",package = "tenm")
p1 <- list.files(tempora_layers_dir,full.names=TRUE,
                 pattern=".tif$",recursive=TRUE)[1]
r1 <- terra::rast(p1)
print(tenm::metaras(r1))

Run the code above in your browser using DataLab