bt_write | R Documentation |
Given a tree & data.frame or vector, this function will create input files for BayesTraits with the suffix \*.bttrees and \*btdata. This function will also format the data file for BayesTrait \(e.g. remove or replace NA values with "-"\)
bt_write(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 |
filename |
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.