coralPreprocess: coralPreprocess

View source: R/coralPreprocess.R

coralPreprocessR Documentation

coralPreprocess

Description

Splits typical Hmsc data into common and rare partitions for CORAL analysis

Usage

coralPreprocess(
  Y,
  spNames.common,
  TrData = NULL,
  phyloTree = NULL,
  Taxa = NULL,
  TaxaFormula = NULL
)

Arguments

Y

community matrix of both common and rare species

spNames.common

vector of species that are considered common in CORAL analysis

TrData

trait matrix for both common and rare species

phyloTree

phylogeny tree covering both common and rare species

Taxa

dataframe with

TaxaFormula

formula for calculating phylogeny from taxonomy, as in as.phylo.formula(...)

Details

This functions implies that all column names of Y that are not listed in spNames.common argument are considered rare species in the context of CORAL analysis.

Exactly one argument of phyloTree and Taxa must be specified.

Value

A named list containing Y.xyz and TrData.xyz parts for common and rare partitions, phylogeny tree phyloTree.common for common part and phylogeny similarity matrix C.common.rare between common and rare species


hmsc-r/HMSC documentation built on March 5, 2025, 10:52 p.m.