Learn R Programming

disaggregation (version 0.1.4)

getCovariateRasters: Get a RasterStack of covariates from a folder containing .tif files

Description

Looks in a specified folder for raster files. Returns a RasterStack of the rasters cropped to the extent specified by the shape parameter.

Usage

getCovariateRasters(directory, file_pattern = ".tif$", shape)

Value

A RasterStack of the raster files in the directory

Arguments

directory

Filepath to the directory containing the rasters.

file_pattern

Pattern the filenames must match. Default is all files ending in .tif .

shape

An object with an extent that the rasters will be cropped to.

Examples

Run this code
if (FALSE) {
  getCovariateRasters('/home/rasters', '.tif$', shape)
 }

Run the code above in your browser using DataLab