Learn R Programming

Claddis

Claddis is an R package designed to import cladistic-type data sets (#NEXUS format) into R and perform disparity analysis and rate tests.

Package status

CRAN

Version

Claddis is on CRAN (version 0.6.3) but is also being developed on GitHub. To get the absolute latest version you can use:

if(!require(devtools)) install.packages("devtools", dependencies = TRUE)
devtools::install_github("graemetlloyd/Claddis", ref = "master")

However, installing a development version of a package is only recommended for expert users.

Please also consult the CHANGELOG file for all updates (including new functions, features and bug fixes) to Claddis.

Installation

You can install Claddis in R via CRAN with:

install.packages("Claddis", dependencies = TRUE)

Or from GitHub with:

if(!require(devtools)) install.packages("devtools", dependencies = TRUE)
devtools::install_github("graemetlloyd/Claddis", ref = "CRAN")

And load it into memory using:

library(Claddis)

Help

Basic help can be found with:

?Claddis

And clicking on the Index link at the base of the help file will reveal links to every available function.

Tutorials

Note that I have previously linked to tutorials for the package here, but substantial reworking of the core code means these will no longer work and so currently the example code in each function's help file is the best substitute for this. New tutorials will eventually be produced and shared here.

Users should also be aware of the dispRity R package, that can form the end of a Claddis disparity pipeline.

Citation

The first formal paper describing Claddis was published as Lloyd (2016):

Lloyd, G. T., 2016. Estimating morphological diversity and tempo with discrete character-taxon matrices: implementation, challenges, progress, and future directions. Biological Journal of the Linnean Society, 118, 131-151.

The effects of ancestral state estimation choices on phylomorphospaces was discussed in Lloyd (2018):

Lloyd, G. T., 2018. Journeys through discrete-character morphospace: synthesizing phylogeny, tempo, and disparity. Palaeontology, 61, 637-645.

Copy Link

Version

Install

install.packages('Claddis')

Monthly Downloads

616

Version

0.7.0

License

GPL (>= 2)

Maintainer

Last Published

September 3rd, 2024

Functions in Claddis (0.7.0)

calculate_WMPD

Calculate weighted mean pairwise distances
check_cladisticMatrix

Check cladisticMatrix object for errors
calculate_kardashian_index

Calculates a researcher's Kardashian Index
calculate_gmax

Calculate the maximum possible tree length, gmax, under parsimony
calculate_morphological_distances

Get distance matrices from a cladistic matrix
check_costMatrix

Check a costMatrix object for errors
check_stateGraph

Check a stateGraph object for errors
calculate_g

Calculate the maximum tree length, g, under parsimony
calculate_tree_length

Calculates the parsimony length of a set of phylogenetic tree(s)
check_taxonGroups

Check taxonGroups object for errors
convert_adjacency_matrix_to_costmatrix

Converts an adjacency matrix to a costmatrix
compactify_cladistic_matrix

Collapses matrix to unique character state distributions
count_cherries

Counts the number of cherries in a tree
check_timeBins

Check timeBins object for errors
classify_costmatrix

Classify a costmatrix character
convert_stategraph_to_costmatrix

Convert a minimal state graph to a costmatrix
convert_costmatrix_to_stategraph

Convert a costmatrix to a minimal state graph
convert_state_tree_to_adjacency_matrix

Converts a character state tree to an adjacency matrix
day_2016

Character-taxon matrix from Day et al. 2016
date_nodes

Returns node ages for a time-scaled tree
find_minimum_spanning_edges

Get edges of minimum spanning tree
find_descendant_edges

Gets descendant edges of an internal node
estimate_ancestral_states

Ancestral Character State Estimation
find_mrca

Find ancestor
drop_time_tip

Drop tips from a time-scaled tree
find_linked_edges

Find linked edges for a tree
find_shortest_costmatrix_path

Finds the shortest path between two states in a costmatrix
find_stategraph_minimum_span

Finds a minimum spanning tree of a stategraph
is.timeBins

Time bins class
estimate_squared_change_ancestors

Estimate ancestral states for a continuous character under squared-change parsimony
is.taxonGroups

Taxon groups class
is.cladisticMatrix

Cladistic matrix class
gauthier_1986

Character-taxon matrix from Gauthier 1986
find_costmatrix_minimum_span

Finds a minimum spanning tree of a costmatrix
find_time_bin_midpoints

Find time bin midpoints
find_unique_trees

Finds only the unique topologies amongst a set
fix_costmatrix

Fixes a costmatrix that has inconsistent costs
locate_bracket_positions

Locates matching positions for sets of brackets in a text string
fix_root_time

Fixes root.time after taxa have been pruned from a tree
make_labels

Make unique text labels
ordinate_cladistic_matrix

Principal Coordinates on a Cladistic Matrix
partition_time_bins

Time bin partitioner
michaux_1989

Character-taxon matrix from Michaux 1989
permute_all_polymorphisms

Permute all possible polymorphisms for a given set of states
make_costmatrix

Make a costmatrix for a given set of states
is_graph_connected

Is a graph connected?
is.stateGraph

Stategraph class
permute_connected_graphs

Permute all connected graphs
permute_treeshapes

Permute all treeshapes of N tips
is.costMatrix

Costmatrix class
match_tree_edges

Edge matching function
map_dollo_changes

Stochastic Character Map For Dollo Character
permute_tipstates

Permute all tip states on a tree
permute_graph_splits

Permute all ways to split a graph
permute_restricted_compositions

Permute all ways to place n items into m bins
permute_all_uncertainties

Permute all possible uncertainties for a given set of states
permute_all_treeshape_labellings

Label treeshapes
print.cladisticMatrix

Compact display of a cladistic matrix
plot_changes_on_tree

Plots character changes on branches
plot_chronophylomorphospace

Chronophylomorphospace Plot
print.taxonGroups

Compact display of taxon groups
print.stateGraph

Compact display of a stategraph
plot_rates_tree

Visualize a rate test time series
plot_rates_time

Visualize a rate test time series
permute_costmatrices

Permute costmatrices
print.costMatrix

Compact display of a costmatrix
plot_multi_morphospace

Plot Multiple Morphopaces
plot_rates_character

Visualize a rate test time series
safe_taxonomic_reduction

Safe Taxonomic Reduction
safe_taxonomic_reinsertion

Reinsert Safely Removed Taxa Into A Tree
plot_morphospace

Plot Morphopace
plot_morphospace_stack

Plot stacked ordination spaces
read_nexus_matrix

Reads in a morphological #NEXUS data file
reconstruct_ancestral_states

Determine maximum parsimony ancestral state reconstruction(s)
split_out_subgraphs

Split adjacency matrix into subgraphs
test_rates

Discrete character rates across trees, time, and character types
prune_cladistic_matrix

Prunes a character matrix of characters or taxa
write_nexus_matrix

Writes out a morphological #NEXUS data file
print.timeBins

Compact display of time bins
trim_matrix

Trims a morphological distance matrix
trim_marginal_whitespace

Trims marginal whitespace
write_tnt_matrix

Writes out a morphological TNT data file
build_cladistic_matrix

Creates a morphological data file from a matrix
add_uncertainties_to_costmatrix

Adds uncertainties to a costmatrix
calculate_MPD

Calculate mean pairwise distances
assign_taxa_to_bins

Assign taxa to time bins
add_polymorphisms_to_costmatrix

Adds polymorphisms to a costmatrix
bin_edge_lengths

Edge-lengths present in time-bins
Claddis-package

Measuring Morphological Diversity and Evolutionary Tempo logo Measures morphological diversity from discrete character data and estimates evolutionary tempo on phylogenetic trees.
align_matrix_block

Aligns a phylogenetic matrix block
bin_character_completeness

Phylogenetic character completeness in time-bins
bin_changes

Counts the changes in a series of time bins