Learn R Programming

wallace (version 2.2.0)

envs_userEnvs: envs_userEnvs

Description

Load user provided rasters

Usage

envs_userEnvs(rasPath, rasName, doBrick = FALSE, logger = NULL)

Value

A rasterStack or a rasterBrick (if doBrick = TRUE) of user provided rasters

Arguments

rasPath

character. Path to rasters, must be the full path including file name and extension

rasName

character. Vector of raster names to be assigned to loaded rasters

doBrick

logical. Converts downloaded rasters to brick for faster processing

logger

Stores all notification messages to be displayed in the Log Window of Wallace GUI. Insert the logger reactive list here for running in shiny, otherwise leave the default NULL

Author

Jamie Kass <jamie.m.kass@gmail.com >

Gonzalo E. Pinilla-Buitrago <gepinillab@gmail.com>

Details

This function is called by the module envs to load user provided raster variables for use in further analyses. It returns either a rasterStack or rasterBrick of loaded variables with appropriate names for further analyses.

Examples

Run this code
if (FALSE) {
pathRast <- list.files(system.file("extdata/wc", package = "wallace"),
                       pattern = ".tif$", full.names = TRUE)
nameRast <- list.files(system.file("extdata/wc", package = "wallace"),
                       pattern = ".tif$", full.names = FALSE)
userEnvs <- envs_userEnvs(rasPath = pathRast, rasName = nameRast)
}

Run the code above in your browser using DataLab