consensus_scn_b: Create consensual projections of climatic scenarios for...

View source: R/5.2.f.consensus_projections.R

consensus_scn_bR Documentation

Create consensual projections of climatic scenarios for multiple species

Description

This function creates consensual projections of climatic scenarios (e.g. GCMs, RCPs, SSPs) for multiple species. User need to supply a 'mcmp.l' object (returned by proj_mdl_b), and a list containing vectors of names for grouping projections. Projections will be grouped by matching the character vectors in the list against projection names

Usage

consensus_scn_b(mcmp.l, groups, ref = NULL, save = T, numCores = 1)

Arguments

mcmp.l

Object returned by proj_mdl_b, containing a list of calibrated models and model projections for each species.

groups

list containing vectors of names for grouping projections.

ref

Character. Name of reference projection (i.e. the one used for calibration and that will not be averaged with any other)

save

Logical. TRUE to save consensual rasters.

numCores

Number of cores to use for parallelization. If set to 1, no paralellization is performed

Value

A 'mcmp.l' object. An object returned from function proj_mdl_b, containing the consensual projections for each element (species) of the list

See Also

consensus_scn, consensus_gr

Examples

## Not run: 
# see projection names
names(mxnt.mdls.preds.cf[[1]]$mxnt.preds)
# create two vectors containing grouping codes
yr <- c(2050, 2070)
rcp <- c("RCP45", "RCP85")
# run
mxnt.mdls.preds.cf <- consensus_scn_b(mcmp.l=mxnt.mdls.preds.cf, groups = list(yr, rcp))

## End(Not run)

HemingNM/ENMwizard documentation built on Jan. 4, 2024, 3:24 p.m.