getData: Function to load data distributed with the spCEH package....

View source: R/spCEH.R

getDataR Documentation

Function to load data distributed with the spCEH package. Data are retrived from tif files stored in extdata. getData masks the equivalent function in raster package, so use raster::getData or spCEH::getData to be explicit. For small-medium sized files, this function is not necessary; the four rasters below can be saved as .rda files. However, this will be needed for anything larger than 100 MB.

Description

Function to load data distributed with the spCEH package. Data are retrived from tif files stored in extdata. getData masks the equivalent function in raster package, so use raster::getData or spCEH::getData to be explicit. For small-medium sized files, this function is not necessary; the four rasters below can be saved as .rda files. However, this will be needed for anything larger than 100 MB.

Usage

getData(name_var = c("alt", "Csoil", "lcm", "twi"), res = 1000)

Arguments

name_var

A variable name, one of "alt", "Csoil", "lcm", "twi".

res

Resolution of the raster grid produced. Defaults to 1000 m. Higher values produce coarser grids by aggregation (e.g. 5000 gives a 5-km grid).

Value

A SpatRasterLayer containing the named variable at the specified resolution.


NERC-CEH/spCEH documentation built on June 12, 2024, 2:45 p.m.