filter_clade: Filter a vector of taxa to those belonging to a given clade

View source: R/utils.R

filter_cladeR Documentation

Filter a vector of taxa to those belonging to a given clade

Description

Given a vector of taxon names and a clade name, returns only those taxa whose lineage includes the specified clade.

Usage

filter_clade(taxa, clade, verbose = FALSE)

Arguments

taxa

A character vector of taxon names.

clade

A character string giving the clade to filter by.

verbose

Logical. If TRUE, prints progress messages. Default FALSE.

Value

A character vector of taxa that are members of the specified clade.

Examples


taxa <- c("Tyrannosaurus", "Triceratops", "Velociraptor",
          "Brachiosaurus", "Homo")
filter_clade(taxa, "Theropoda")
filter_clade(taxa, "Dinosauria")


taxodist documentation built on May 6, 2026, 1:06 a.m.