char2TreeCategorical: Creates a categorical trait tree from a set of tip species.

char2TreeCategoricalR Documentation

Creates a categorical trait tree from a set of tip species.

Description

Creates a categorical trait tree from a set of tip species.

Usage

char2TreeCategorical(
  tipvals,
  treesObj,
  useSpecies = NULL,
  model = "ER",
  root_prior = "auto",
  plot = FALSE,
  anctrait = NULL
)

Arguments

tipvals

the trait/phenotype/character value at the tip, names(tip.vals) should match some of the mastertree$tip.label, though a perfect match is not required

treesObj

A treesObj created by readTrees

useSpecies

Give only a subset of the species to use for ancestral state reconstruction (e.g., only those species for which the trait can be reliably determined).

model

Specifies what rate model to use

root_prior

The prior probabilities of each trait at the root used to fit the transition matrix. Can be a vector of length equal to the number of states or one of the following: "flat", "empirical", "stationary", "likelihoods", "max_likelihood".

plot

Plots a phenotype tree

anctrait

The trait to use for all ancestral species instead of inferring ancestral states if not NULL. The default is NULL.

Value

A tree with edge.length representing phenotype states


nclark-lab/RERconverge documentation built on March 2, 2024, 8:51 a.m.