| Efficient computations on large phylogenetic trees. | castor-package castor |
| Empirical ancestral state probabilities. | asr_empirical_probabilities |
| Ancestral state reconstruction via phylogenetic independent contrasts. | asr_independent_contrasts |
| Maximum-parsimony ancestral state reconstruction. | asr_max_parsimony |
| Ancestral state reconstruction with Mk models and rerooting | asr_mk_model |
| Squared-change parsimony ancestral state reconstruction. | asr_squared_change_parsimony |
| Ancestral state reconstruction via subtree averaging. | asr_subtree_averaging |
| Estimate the density of tips & nodes in a timetree. | clade_densities |
| Remove monofurcations from a tree. | collapse_monofurcations |
| Collapse nodes of a tree at a phylogenetic resolution. | collapse_tree_at_resolution |
| Extract dating anchors for a target tree, using a dated reference tree | congruent_divergence_times |
| Generate a congruent homogenous-birth-death-sampling model. | congruent_hbds_model |
| Compute consensus taxonomies across a tree. | consensus_taxonomies |
| Calculate phylogenetic depth of a binary trait using the consenTRAIT metric. | consentrait_depth |
| Correlations between phylogenetic & geographic distances. | correlate_phylo_geodistances |
| Count number of lineages through time (LTT). | count_lineages_through_time |
| Count descending tips. | count_tips_per_node |
| Count the number of state transitions between tips or nodes. | count_transitions_between_clades |
| Date a tree based on relative evolutionary divergences. | date_tree_red |
| Calculate phylogenetic depth of a discrete trait. | discrete_trait_depth |
| Evaluate a scalar spline at arbitrary locations. | evaluate_spline |
| Place queries on a tree from a jplace file. | expanded_tree_from_jplace |
| Expected distances traversed by a Spherical Brownian Motion. | expected_distances_sbm |
| Exponentiate a matrix. | exponentiate_matrix |
| Extend a rooted tree up to a specific height. | extend_tree_to_height |
| Extract tips representing a tree's deep splits. | extract_deep_frame |
| Extract tree constraints in FastTree alignment format. | extract_fasttree_constraints |
| Extract a subtree spanning tips within a certain neighborhood. | extract_tip_neighborhood |
| Extract a subtree spanning tips within a certain radius. | extract_tip_radius |
| Find the two most distant tips in a tree. | find_farthest_tip_pair |
| Find farthest tip to each tip & node of a tree. | find_farthest_tips |
| Find nearest tip to each tip & node of a tree. | find_nearest_tips |
| Find the root of a tree. | find_root |
| Find the node or tip that, as root, would make a set of target tips monophyletic. | find_root_of_monophyletic_tips |
| Fit and compare Brownian Motion models for multivariate trait evolution between two data sets. | fit_and_compare_bm_models |
| Fit and compare Spherical Brownian Motion models for diffusive geographic dispersal between two data sets. | fit_and_compare_sbm_const |
| Fit a Brownian Motion model for multivariate trait evolution. | fit_bm_model |
| Fit a homogenous birth-death model on a discrete time grid. | fit_hbd_model_on_grid |
| Fit a parametric homogenous birth-death model to a timetree. | fit_hbd_model_parametric |
| Fit pulled diversification rates of birth-death models on a time grid with optimal size. | fit_hbd_pdr_on_best_grid_size |
| Fit pulled diversification rates of birth-death models on a time grid. | fit_hbd_pdr_on_grid |
| Fit parameterized pulled diversification rates of birth-death models. | fit_hbd_pdr_parametric |
| Fit pulled speciation rates of birth-death models on a time grid with optimal size. | fit_hbd_psr_on_best_grid_size |
| Fit pulled speciation rates of birth-death models on a time grid. | fit_hbd_psr_on_grid |
| Fit parameterized pulled speciation rates of birth-death models. | fit_hbd_psr_parametric |
| Fit a homogenous birth-death-sampling model on a discrete time grid. | fit_hbds_model_on_grid |
| Fit a parametric homogenous birth-death-sampling model to a timetree. | fit_hbds_model_parametric |
| Fit a Markov (Mk) model for discrete trait evolution. | fit_mk |
| Fit a discrete-state-dependent diversification model via maximum-likelihood. | fit_musse |
| Fit a phylogeographic Spherical Brownian Motion model. | fit_sbm_const |
| Fit a phylogeographic Spherical Brownian Motion model with geographic sampling bias. | fit_sbm_geobiased_const |
| Fit a phylogeographic Spherical Brownian Motion model with linearly varying diffusivity. | fit_sbm_linear |
| Fit a phylogeographic Spherical Brownian Motion model with piecewise-linear diffusivity. | fit_sbm_on_grid |
| Fit a time-dependent phylogeographic Spherical Brownian Motion model. | fit_sbm_parametric |
| Fit a cladogenic model to an existing tree. | fit_tree_model |
| Calculate the gamma-statistic of a tree. | gamma_statistic |
| Generate a gene tree based on the multi-species coalescent model. | generate_gene_tree_msc |
| Generate gene trees based on the multi-species coalescent, horizontal gene transfers and duplications/losses. | generate_gene_tree_msc_hgt_dl |
| Generate a tree using a Poissonian speciation/extinction model. | generate_random_tree |
| Generate a tree from a birth-death model in reverse time. | generate_tree_hbd_reverse |
| Generate a tree from a birth-death-sampling model in forward time. | generate_tree_hbds |
| Generate a random tree with evolving speciation/extinction rates. | generate_tree_with_evolving_rates |
| Phylogenetic autocorrelation function of geographic locations. | geographic_acf |
| Get distances of all tips and nodes to the root. | get_all_distances_to_root |
| Get distances of all tips/nodes to a focal tip. | get_all_distances_to_tip |
| Get the phylogenetic depth of each node in a tree. | get_all_node_depths |
| Get distances between all pairs of tips and/or nodes. | get_all_pairwise_distances |
| Compute ancestral nodes. | get_ancestral_nodes |
| Get a representation of a tree as a table listing tips/nodes. | get_clade_list |
| Phylogenetic independent contrasts for continuous traits. | get_independent_contrasts |
| Extract disjoint tip pairs with independent relationships. | get_independent_sister_tips |
| Most recent common ancestor of a set of tips/nodes. | get_mrca_of_set |
| Get distances between pairs of tips or nodes. | get_pairwise_distances |
| Get most recent common ancestors of tip/node pairs. | get_pairwise_mrcas |
| Create a random diffusivity matrix for a Brownian motion model. | get_random_diffusivity_matrix |
| Create a random transition matrix for an Mk model. | get_random_mk_transition_matrix |
| Calculate relative evolutionary divergences in a tree. | get_reds |
| Stationary distribution of Markov transition matrix. | get_stationary_distribution |
| Extract a subtree descending from a specific node. | get_subtree_at_node |
| Extract a subtree spanning a specific subset of tips. | get_subtree_with_tips |
| Extract subtrees descending from specific nodes. | get_subtrees_at_nodes |
| Find tips with specific most recent common ancestors. | get_tips_for_mrcas |
| Phylogenetic autocorrelation function of a numeric trait. | get_trait_acf |
| Calculate mean & standard deviation of a numeric trait on a dated tree over time. | get_trait_stats_over_time |
| Create an index matrix for a Markov transition model. | get_transition_index_matrix |
| Get min and max distance of any tip to the root. | get_tree_span |
| Traverse tree from root to tips. | get_tree_traversal_root_to_tips |
| Hidden state prediction for a binary trait based on the binomial distribution. | hsp_binomial |
| Hidden state prediction via empirical probabilities. | hsp_empirical_probabilities |
| Hidden state prediction via phylogenetic independent contrasts. | hsp_independent_contrasts |
| Hidden state prediction via maximum parsimony. | hsp_max_parsimony |
| Hidden state prediction with Mk models and rerooting | hsp_mk_model |
| Naive hidden state prediction. | hsp_naive |
| Hidden state prediction based on nearest neighbor. | hsp_nearest_neighbor |
| Hidden state prediction via squared-change parsimony. | hsp_squared_change_parsimony |
| Hidden state prediction via subtree averaging. | hsp_subtree_averaging |
| Determine if a tree is bifurcating. | is_bifurcating |
| Determine if a set of tips is monophyletic. | is_monophyletic |
| Join two rooted trees. | join_rooted_trees |
| Galculate the log-likelihood of a homogenous birth-death model. | loglikelihood_hbd |
| Map states of a discrete trait to integers. | map_to_state_space |
| Compute the expected absolute change of an Ornstein-Uhlenbeck process. | mean_abs_change_scalar_ou |
| Merge specific nodes into multifurcations. | merge_nodes_to_multifurcations |
| Eliminate short edges in a tree by merging nodes into multifurcations. | merge_short_edges |
| Check if a birth-death model adequately explains a timetree. | model_adequacy_hbd |
| Check if a birth-death-sampling model adequately explains a timetree. | model_adequacy_hbds |
| Expand multifurcations to bifurcations. | multifurcations_to_bifurcations |
| Pick random subsets of tips on a tree. | pick_random_tips |
| Place queries on a tree based on taxonomic identities. | place_tips_taxonomically |
| Plot a tree in radial layout. | plot_tree_radial |
| Load a fasta file. | read_fasta |
| Load a fastq file. | read_fastq |
| Load a tree from a string or file in Newick (parenthetic) format. | read_tree |
| Reconstruct past diversification dynamics from a diversity time series. | reconstruct_past_diversification |
| Reorder tree edges in preorder or postorder. | reorder_tree_edges |
| Root a tree at the midpoint node. | root_at_midpoint |
| Root a tree at a specific node. | root_at_node |
| Root a tree in the middle of an edge. | root_in_edge |
| Root a tree based on an outgroup tip. | root_via_outgroup |
| Root a tree via root-to-tip regression. | root_via_rtt |
| Shift the time of specific nodes & tips. | shift_clade_times |
| Simulate a Brownian motion model for multivariate trait co-evolution. | simulate_bm_model |
| Simulate a deterministic homogenous birth-death model. | simulate_deterministic_hbd |
| Simulate a deterministic homogenous birth-death-sampling model. | simulate_deterministic_hbds |
| Simulate a deterministic uniform speciation/extinction model. | simulate_diversification_model |
| Simulate a Discrete-State Speciation and Extinction (dSSE) model. | simulate_dsse simulate_musse |
| Simulate an Mk model for discrete trait evolution. | simulate_mk_model |
| Simulate an Ornstein-Uhlenbeck model for continuous trait evolution. | simulate_ou_model |
| Simulate a reflected Ornstein-Uhlenbeck model for continuous trait evolution. | simulate_rou_model |
| Simulate Spherical Brownian Motion on a tree. | simulate_sbm |
| Simulate a time-dependent Discrete-State Speciation and Extinction (tdSSE) model. | simulate_tdsse |
| Get the polynomial coefficients of a spline. | spline_coefficients |
| Split a tree into subtrees at a specific height. | split_tree_at_height |
| Calculate the distance between two trees. | tree_distance |
| Generate a random timetree with specific branching ages. | tree_from_branching_ages |
| Generate a random timetree with specific tip/sampling and node/branching ages. | tree_from_sampling_branching_ages |
| Construct a rooted tree from lists of taxa. | tree_from_taxa |
| Calculate various imbalance statistics for a tree. | tree_imbalance |
| Trim a rooted tree down to a specific height. | trim_tree_at_height |
| Write a tree in Newick (parenthetic) format. | write_tree |