write.bayestraits: Writing BayesTraits files

Description Usage Arguments Value

View source: R/bayes-traits-functions.R

Description

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.

Usage

1
2
write.bayestraits(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

optional:

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/excdr documentation built on May 23, 2019, 10:36 p.m.