Description Usage Arguments Value Examples
View source: R/transform_rasters.R
transform_rasters
Get model predictions for a raster stack
1 2 | transform_rasters(raster_stack, FUN_qlist, separator = "_",
alert = NULL)
|
raster_stack |
RasterStack. Stack with environmental layers. |
FUN_qlist |
list. A list of unevaluated expressions, as created by function qlist. |
separator |
character. Character that separates variable names, years and scenarios. |
alert |
integer. Plays a sound alert when function is done running. See documentation of package |
Returns a RasterStack with layers for the predictions required.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | FulanusEcoRasters_present <-
get_rasters(
raster_source = "/Users/gabriel/Documents/Mapinguari/global_grids_10_minutes",
ext = FulanusDistribution,
margin = 5,
non_fixed_var = c('prec', 'tmin', 'tmax'),
fixed_var = 'alt',
years = c("present"),
reorder = TRUE)
transform_rasters(raster_stack = FulanusEcoRasters_present$present,
FUN = qlist(total_1sem = sum(tmax[[1:6]]),
mean_1sem = mean(tmax[[1:6]]),
sd_1sem = sd(tmax[[1:6]]),
total_2sem = sum(tmax[[7:12]]),
mean_2sem = mean(tmax[[7:12]]),
sd_2sem = sd(tmax[[7:12]])),
separator = '_',
alert = NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.