Skip to contents

Assumes that the name of the raster layer is the name of the variable if static is true, otherwise, the user must supply the correct variable name. If static is false, the name of the raster layer is assumed to be the time variable.

Usage

rast_to_df(rast, static = TRUE, varname = NULL)

Arguments

rast

SpatRaster

static

True if no temporal dimension, False else.

varname

The variable name, only required if static is False.

Value

data.frame

Examples

ne <- gen_naturalearth_cover()
#> Error in get_pgfile(source_name = "Natural Earth Physical 10m Land", source_version = "5.1.1",     id = "92da9800-4520-4e87-a855-b28255452189"): /Volumes/T7/priogrid_data does not exist. Please pgoptions$set_rawfolder().
rast_to_df(ne)
#> Error: object 'ne' not found