calcTempBetaDiv.master: TEMPORAL BETA-DIVERSITY WRAPPER FUNCTION FOR PIXEL BY SPP...

View source: R/networksBetadiversity.R

calcTempBetaDiv.masterR Documentation

TEMPORAL BETA-DIVERSITY WRAPPER FUNCTION FOR PIXEL BY SPP MATRICES

Description

this function loads and prepares networks to calculate temporal spp turnover (beta diversity) and saves the outputs. Beta diversity is calculated per pairs of pixels of the same location, but different scenarios (a baseline scenario and a change scenario). This function was designed to be parallelized. The user should provide one scenario file at a time and a vector of baseline files (which will be matched to the scenario - SDM stat. model match)

Usage

calcTempBetaDiv.master(
  masterScen.file,
  masterBL.files,
  families = c("allTaxon", "bird", "mammal", "reptile", "amphibian"),
  out.dir,
  scen.dir,
  toDo = "all",
  method = "all"
)

Arguments

masterScen.file

one scenario pixelXspp matrix file path, which can be made by makeAndSaveMasterScen.

masterBL.files

a vectorlis of baseline pixelXspp matrix files, which can be made by makeAndSaveMasterBL.

families

character. determines for which families beta div will be calculated (this subsets the species). Can be all, one or a combination of c("allTaxon", "bird", "mammal", "reptile", "amphibian"), "allTaxon" meaning no subsetting is done and beta-diversity metrics are calculated across all species. Defaults to all of these.

out.dir

is were beta-diversity tables will be saved (in a folder tree respecting scenario folders.)

scen.dir

is the "root" directory where "scenario networks" were stored

toDo

controls if beta-diversity hhas to be recalculated for 'all' scenarios or just 'missing' ones

method

passed to networkTempBetaDiv.master

Value

the output beta-diversity file path


CeresBarros/ToolsCB documentation built on Aug. 23, 2024, 4:22 p.m.