A wrapper for data.table that enables fast manipulation of phylogenetic trees matched to data.
data.table package enables high-performance extended functionality for data tables in R.
treedata.table is a wrapper for
data.table for phylogenetic analyses that matches a phylogeny to the data.table, and preserves matching during
Simultaneous processing of phylogenetic trees and data remains a computationally-intensive task. For example, processing a dataset of phylogenetic characters alongside a tree in
treedata.table takes 90% longer than processing the data alone in
data.table (Fig. 1A).
treedata.table provides new tools for increasing the speed and efficiency of phylogenetic data processing. Data manipulation in
treedata.table is significantly faster than in other commonly used packages such as
treeplyr (>60%), and
dplyr (>90%). Additionally,
treedata.table is >400% faster than
treeplyr during the initial data/tree matching step (Fig. 1B).
Fig. 1. Results for the
treedata.table microbenchmark during (A) data manipulation (
treedata.table[) and (B) tree/data matching steps. We compare the performance of
dplyr using the
microbenchmark R package.
treedata.table can be installed from GitHub at the present. We presently recommend installing using
treedata.table is designed with the intention of being able to efficiently manipulate trait data and phylogenetic trees to enable comparative analyses. With the package is bundled some example data. Let’s load it in and look at some common analyses.
as.treedata.table converts a normal comma- or tab-delimited file to the
data.table format. This enables a range of efficient and intutive indexing and selection operations.
As an example, in our dataset is the column
SVL, or snout-to-vent length in our anoles. We can index out this column on the fly, and run a Brownian motion analysis on this trait using the R package Geiger:
We can also do efficient dropping of taxa from the analysis like so:
More details about the functions implemented in
treedata.table can be found in the different vignettes associated with the package or in our website.
Please see our contributing guide.
Please see the package DESCRIPTION for package authors.