powered by
Looks in a specified folder for raster files. Returns a RasterStack of the rasters cropped to the extent specified by the shape parameter.
getCovariateRasters(directory, file_pattern = ".tif$", shape)
A RasterStack of the raster files in the directory
Filepath to the directory containing the rasters.
Pattern the filenames must match. Default is all files ending in .tif .
An object with an extent that the rasters will be cropped to.
if (FALSE) { getCovariateRasters('/home/rasters', '.tif$', shape) }
Run the code above in your browser using DataLab