calc_ancestral_state: Ancestral State per Assemblage

View source: R/function_ancestral_state.R

calc_ancestral_stateR Documentation

Ancestral State per Assemblage

Description

Ancestral State per Assemblage

Usage

calc_ancestral_state(tree, ancestral.area, prefix = "N")

Arguments

tree

A newick phylogenetic tree object

ancestral.area

One column data frame. Lines are nodes the column are the biomes/region of occurrence for each ancestors. Can be obtained by using (get_node_range_BioGeoBEARS)

prefix

A single character string to be used to name nodes

Value

A data frame with assemblages in lines and nodes in columns. Each cell contains the ancestral area/Ecoregion of occurrence for each node and its respective species.

Author(s)

Gabriel Nakamura gabriel.nakamura.souza@gmail.com

Examples

biogeo_toy <- data.frame(Ecoregion= c("A", "B", "C"))
ancestral_area_toy <- data.frame(state= c("ABC", "B", "C", "ABC"))
calc_ancestral_state(toy_treeEx, ancestral_area_toy)

GabrielNakamura/Rrodotus documentation built on Aug. 31, 2023, 2:13 p.m.