Description Usage Arguments Value
View source: R/bayes-traits-functions.R
Given a data.frame and either a single object of class phylo or a list of class phylo objects, this function will subset the data on specified variables and prune the trees to match that data (optionally removing NA values) and write the data into a format suitable for use with BayesTraits.
1 2 | write.bayestraits(tree, data, variables, dir = "./", na.omit = FALSE,
filename)
|
tree |
an object of class phylo or list of phylo objects |
data |
a data.frame |
variables |
a character string or character vector of the names of columns to subset to, alternatively you can use the numeric values to indicate the column |
dir |
the directory to save the output files to. Defaults to current directory |
na.omit |
a TRUE/FALSE argument to specify whether NA values should be removed from your final data file |
optional: |
used to name the output file. Will use variable names by default. |
two files will be saved to the specified directory *.bttrees holding the pruned tree files and *.btdata holding the subset and formatted data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.