getData | R 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.
getData(name_var = c("alt", "Csoil", "lcm", "twi"), res = 1000)
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). |
A SpatRasterLayer containing the named variable at the specified resolution.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.