Learn R Programming

orchaRd (version 2.2.1)

.validate_phylo_args: Validate Phylogenetic Arguments

Description

Checks the validity of the arguments provided for phylogenetic matrix calculations. Ensures the tree is a proper phylogenetic object and that the species column name is correctly linked to a random effect in the model.

Usage

.validate_phylo_args(model, phylo_args)

Value

The validated phylo_args list if all checks pass.

Arguments

model

A metafor model object with random effects.

phylo_args

A list containing the arguments for the phylogenetic matrix calculation:

  • tree: A phylogenetic tree object of class "phylo"

  • species_colname: Name of the column in the data corresponding to species names, which should be a random factor linked to a matrix in the model