Package: Claddis 0.7.0

Claddis: Measuring Morphological Diversity and Evolutionary Tempo

Measures morphological diversity from discrete character data and estimates evolutionary tempo on phylogenetic trees. Imports morphological data from #NEXUS (Maddison et al. (1997) <doi:10.1093/sysbio/46.4.590>) format with read_nexus_matrix(), and writes to both #NEXUS and TNT format (Goloboff et al. (2008) <doi:10.1111/j.1096-0031.2008.00217.x>). Main functions are test_rates(), which implements AIC and likelihood ratio tests for discrete character rates introduced across Lloyd et al. (2012) <doi:10.1111/j.1558-5646.2011.01460.x>, Brusatte et al. (2014) <doi:10.1016/j.cub.2014.08.034>, Close et al. (2015) <doi:10.1016/j.cub.2015.06.047>, and Lloyd (2016) <doi:10.1111/bij.12746>, and calculate_morphological_distances(), which implements multiple discrete character distance metrics from Gower (1971) <doi:10.2307/2528823>, Wills (1998) <doi:10.1006/bijl.1998.0255>, Lloyd (2016) <doi:10.1111/bij.12746>, and Hopkins and St John (2018) <doi:10.1098/rspb.2018.1784>. This also includes the GED correction from Lehmann et al. (2019) <doi:10.1111/pala.12430>. Multiple functions implement morphospace plots: plot_chronophylomorphospace() implements Sakamoto and Ruta (2012) <doi:10.1371/journal.pone.0039752>, plot_morphospace() implements Wills et al. (1994) <doi:10.1017/S009483730001263X>, plot_changes_on_tree() implements Wang and Lloyd (2016) <doi:10.1098/rspb.2016.0214>, and plot_morphospace_stack() implements Foote (1993) <doi:10.1017/S0094837300015864>. Other functions include safe_taxonomic_reduction(), which implements Wilkinson (1995) <doi:10.1093/sysbio/44.4.501>, map_dollo_changes() implements the Dollo stochastic character mapping of Tarver et al. (2018) <doi:10.1093/gbe/evy096>, and estimate_ancestral_states() implements the ancestral state options of Lloyd (2018) <doi:10.1111/pala.12380>. calculate_tree_length() and reconstruct_ancestral_states() implements the generalised algorithms from Swofford and Maddison (1992; no doi).

Authors:Graeme T. Lloyd [aut, cre, cph], Thomas Guillerme [aut, cph], Jen Hoyal Cuthill [aut, cph], Emma Sherratt [aut, cph], Steve C. Wang [aut, cph]

Claddis_0.7.0.tar.gz
Claddis_0.7.0.zip(r-4.5)Claddis_0.7.0.zip(r-4.4)Claddis_0.7.0.zip(r-4.3)
Claddis_0.7.0.tgz(r-4.4-any)Claddis_0.7.0.tgz(r-4.3-any)
Claddis_0.7.0.tar.gz(r-4.5-noble)Claddis_0.7.0.tar.gz(r-4.4-noble)
Claddis_0.7.0.tgz(r-4.4-emscripten)Claddis_0.7.0.tgz(r-4.3-emscripten)
Claddis.pdf |Claddis.html
Claddis/json (API)

# Install 'Claddis' in R:
install.packages('Claddis', repos = c('https://graemetlloyd.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/graemetlloyd/claddis/issues

Datasets:
  • day_2016 - Character-taxon matrix from Day et al. 2016
  • gauthier_1986 - Character-taxon matrix from Gauthier 1986
  • michaux_1989 - Character-taxon matrix from Michaux 1989

On CRAN:

7.96 score 13 stars 2 packages 75 scripts 541 downloads 8 mentions 88 exports 47 dependencies

Last updated 2 months agofrom:66d0d06037. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 03 2024
R-4.5-winOKNov 03 2024
R-4.5-linuxOKNov 03 2024
R-4.4-winOKNov 03 2024
R-4.4-macOKNov 03 2024
R-4.3-winOKNov 03 2024
R-4.3-macOKNov 03 2024

Exports:add_polymorphisms_to_costmatrixadd_uncertainties_to_costmatrixalign_matrix_blockassign_taxa_to_binsbin_changesbin_character_completenessbin_edge_lengthsbuild_cladistic_matrixcalculate_gcalculate_gmaxcalculate_kardashian_indexcalculate_morphological_distancescalculate_MPDcalculate_tree_lengthcalculate_WMPDcheck_cladisticMatrixcheck_costMatrixcheck_stateGraphcheck_taxonGroupscheck_timeBinsclassify_costmatrixcompactify_cladistic_matrixconvert_adjacency_matrix_to_costmatrixconvert_costmatrix_to_stategraphconvert_state_tree_to_adjacency_matrixconvert_stategraph_to_costmatrixcount_cherriesdate_nodesdrop_time_tipestimate_ancestral_statesestimate_squared_change_ancestorsfind_costmatrix_minimum_spanfind_descendant_edgesfind_linked_edgesfind_minimum_spanning_edgesfind_mrcafind_shortest_costmatrix_pathfind_stategraph_minimum_spanfind_time_bin_midpointsfind_unique_treesfix_costmatrixfix_root_timeis_graph_connectedis.cladisticMatrixis.costMatrixis.stateGraphis.taxonGroupsis.timeBinslocate_bracket_positionsmake_costmatrixmake_labelsmap_dollo_changesmatch_tree_edgesordinate_cladistic_matrixpartition_time_binspermute_all_polymorphismspermute_all_treeshape_labellingspermute_all_uncertaintiespermute_connected_graphspermute_costmatricespermute_graph_splitspermute_restricted_compositionspermute_tipstatespermute_treeshapesplot_changes_on_treeplot_chronophylomorphospaceplot_morphospaceplot_morphospace_stackplot_multi_morphospaceplot_rates_characterplot_rates_timeplot_rates_treeprint.cladisticMatrixprint.costMatrixprint.stateGraphprint.taxonGroupsprint.timeBinsprune_cladistic_matrixread_nexus_matrixreconstruct_ancestral_statessafe_taxonomic_reductionsafe_taxonomic_reinsertionsplit_out_subgraphstest_ratestrim_marginal_whitespacetrim_matrixwrite_nexus_matrixwrite_tnt_matrix

Dependencies:apeclicliprclusterGenerationcodacodetoolscombinatcpp11DEoptimdigestdoParallelexpmfastmatchforeachgenericsgeoscalegluegmpigraphiteratorslatticelifecyclemagrittrmapsMASSmathjaxrMatrixmnormtmulticoolnlmenumDerivoptimParallelpartitionspbapplyphangornphytoolspkgconfigpolynomquadprogrbibutilsRcppRdpackrlangscatterplot3dsetsstrapvctrs

Readme and manuals

Help Manual

Help pageTopics
Measuring Morphological Diversity and Evolutionary Tempo Measures morphological diversity from discrete character data and estimates evolutionary tempo on phylogenetic trees.Claddis-package Claddis
Adds polymorphisms to a costmatrixadd_polymorphisms_to_costmatrix
Adds uncertainties to a costmatrixadd_uncertainties_to_costmatrix
Aligns a phylogenetic matrix blockalign_matrix_block
Assign taxa to time binsassign_taxa_to_bins
Counts the changes in a series of time binsbin_changes
Phylogenetic character completeness in time-binsbin_character_completeness
Edge-lengths present in time-binsbin_edge_lengths
Creates a morphological data file from a matrixbuild_cladistic_matrix
Calculate the maximum tree length, g, under parsimonycalculate_g
Calculate the maximum possible tree length, gmax, under parsimonycalculate_gmax
Calculates a researcher's Kardashian Indexcalculate_kardashian_index
Get distance matrices from a cladistic matrixcalculate_morphological_distances
Calculate mean pairwise distancescalculate_MPD
Calculates the parsimony length of a set of phylogenetic tree(s)calculate_tree_length
Calculate weighted mean pairwise distancescalculate_WMPD
Check cladisticMatrix object for errorscheck_cladisticMatrix
Check a costMatrix object for errorscheck_costMatrix
Check a stateGraph object for errorscheck_stateGraph
Check taxonGroups object for errorscheck_taxonGroups
Check timeBins object for errorscheck_timeBins
Classify a costmatrix characterclassify_costmatrix
Collapses matrix to unique character state distributionscompactify_cladistic_matrix
Converts an adjacency matrix to a costmatrixconvert_adjacency_matrix_to_costmatrix
Convert a costmatrix to a minimal state graphconvert_costmatrix_to_stategraph
Converts a character state tree to an adjacency matrixconvert_state_tree_to_adjacency_matrix
Convert a minimal state graph to a costmatrixconvert_stategraph_to_costmatrix
Counts the number of cherries in a treecount_cherries
Returns node ages for a time-scaled treedate_nodes
Character-taxon matrix from Day et al. 2016day_2016
Drop tips from a time-scaled treedrop_time_tip
Ancestral Character State Estimationestimate_ancestral_states
Estimate ancestral states for a continuous character under squared-change parsimonyestimate_squared_change_ancestors
Finds a minimum spanning tree of a costmatrixfind_costmatrix_minimum_span
Gets descendant edges of an internal nodefind_descendant_edges
Find linked edges for a treefind_linked_edges
Get edges of minimum spanning treefind_minimum_spanning_edges
Find ancestorfind_mrca
Finds the shortest path between two states in a costmatrixfind_shortest_costmatrix_path
Finds a minimum spanning tree of a stategraphfind_stategraph_minimum_span
Find time bin midpointsfind_time_bin_midpoints
Finds only the unique topologies amongst a setfind_unique_trees
Fixes a costmatrix that has inconsistent costsfix_costmatrix
Fixes root.time after taxa have been pruned from a treefix_root_time
Character-taxon matrix from Gauthier 1986gauthier_1986
Is a graph connected?is_graph_connected
Cladistic matrix classis.cladisticMatrix
Costmatrix classis.costMatrix
Stategraph classis.stateGraph
Taxon groups classis.taxonGroups
Time bins classis.timeBins
Locates matching positions for sets of brackets in a text stringlocate_bracket_positions
Make a costmatrix for a given set of statesmake_costmatrix
Make unique text labelsmake_labels
Stochastic Character Map For Dollo Charactermap_dollo_changes
Edge matching functionmatch_tree_edges
Character-taxon matrix from Michaux 1989michaux_1989
Principal Coordinates on a Cladistic Matrixordinate_cladistic_matrix
Time bin partitionerpartition_time_bins
Permute all possible polymorphisms for a given set of statespermute_all_polymorphisms
Label treeshapespermute_all_treeshape_labellings
Permute all possible uncertainties for a given set of statespermute_all_uncertainties
Permute all connected graphspermute_connected_graphs
Permute costmatricespermute_costmatrices
Permute all ways to split a graphpermute_graph_splits
Permute all ways to place n items into m binspermute_restricted_compositions
Permute all tip states on a treepermute_tipstates
Permute all treeshapes of N tipspermute_treeshapes
Plots character changes on branchesplot_changes_on_tree
Chronophylomorphospace Plotplot_chronophylomorphospace
Plot Morphopaceplot_morphospace
Plot stacked ordination spacesplot_morphospace_stack
Plot Multiple Morphopacesplot_multi_morphospace
Visualize a rate test time seriesplot_rates_character
Visualize a rate test time seriesplot_rates_time
Visualize a rate test time seriesplot_rates_tree
Compact display of a cladistic matrixprint.cladisticMatrix
Compact display of a costmatrixprint.costMatrix
Compact display of a stategraphprint.stateGraph
Compact display of taxon groupsprint.taxonGroups
Compact display of time binsprint.timeBins
Prunes a character matrix of characters or taxaprune_cladistic_matrix
Reads in a morphological #NEXUS data fileread_nexus_matrix
Determine maximum parsimony ancestral state reconstruction(s)reconstruct_ancestral_states
Safe Taxonomic Reductionsafe_taxonomic_reduction
Reinsert Safely Removed Taxa Into A Treesafe_taxonomic_reinsertion
Split adjacency matrix into subgraphssplit_out_subgraphs
Discrete character rates across trees, time, and character typestest_rates
Trims marginal whitespacetrim_marginal_whitespace
Trims a morphological distance matrixtrim_matrix
Writes out a morphological #NEXUS data filewrite_nexus_matrix
Writes out a morphological TNT data filewrite_tnt_matrix