consensus_gr: Group climate scenarios for consensual projections

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

consensus_grR Documentation

Group climate scenarios for consensual projections

Description

This function groups climate scenarios by supplied groups (e.g. GCMs, RCPs, SSPs) for consensual projections. User need to supply a list containing vectors of names for grouping projections and names of climate scenarios. Projections will be grouped by matching the character vectors in the list against projection names

Usage

consensus_gr(groups, clim.scn.nms)

Arguments

groups

list containing vectors of names for grouping projections.

clim.scn.nms

Vector with names of climate scenarios

Value

A data.frame with three columns: climate scenario names, group names, and group numbers

See Also

consensus_scn, consensus_scn_b

Examples

## Not run: 
# see projection names
names(mxnt.mdls.preds.cf[[1]]$mxnt.preds)
# vector with projection names
clim.scn.nms <- c("CCSM4.2050.RCP45",  "MIROC.ESM.2050.RCP45", "MPI.ESM.LR.2050.RCP45",
                  "CCSM4.2070.RCP45",  "MIROC.ESM.2070.RCP45", "MPI.ESM.LR.2070.RCP45",
                  "CCSM4.2050.RCP85",  "MIROC.ESM.2050.RCP85", "MPI.ESM.LR.2050.RCP85",
                  "CCSM4.2070.RCP85",  "MIROC.ESM.2070.RCP85", "MPI.ESM.LR.2070.RCP85")
# create two vectors containing grouping codes
yr <- c(2050, 2070)
rcp <- c("RCP45", "RCP85")
# run
consensus_gr(groups = list(yr, rcp), clim.scn.nms)

## End(Not run)

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