bt_write: Write / Create BayesTraits tree and data files

Description Usage Arguments Value

View source: R/write_files.R

Description

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 "-"\)

Usage

1
bt_write(tree, data, variables, dir = "./", na.omit = FALSE, filename)

Arguments

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.

Value

two files will be saved to the specified directory *.bttrees holding the pruned tree files and *.btdata holding the subset and formatted data.


SamPassmore/bayestraitr documentation built on Dec. 10, 2018, 2:32 a.m.