write.phylopars: Write data and tree files for Python phylopars compatability.

Description Usage Arguments Author(s) References Examples

View source: R/phylopars_main.R

Description

Writes data and tree files for Python phylopars compatibility.

Usage

1
write.phylopars(trait_data, tree, data_file, tree_file, species_identifier = "species")

Arguments

trait_data

A data frame with one column per trait, as well as a column labeled "species" (with species names matching tips on the phylogeny). Each row corresponds to a single observation, and multiple observation for species are allowed. Missing data should be represented with NA.

tree

An object of class phylo

data_file

Desired path to write data file.

tree_file

Desired path to write tree file.

species_identifier

Title of species column in data file. Defaulted to "species"

Author(s)

Eric W. Goolsby eric.goolsby.evolution@gmail.com

References

Bruggeman J, Heringa J and Brandt BW. (2009) PhyloPars: estimation of missing parameter values using phylogeny. Nucleic Acids Research 37: W179-W184.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# simulate data
sim_data <- simtraits(ntaxa = 15,ntraits = 4,nreps = 3,nmissing = 10)

write.phylopars(trait_data = sim_data$trait_data,tree = sim_data$tree,data_file = "data_path.txt",
tree_file = "tree_path.new")

## End(Not run)

Rphylopars documentation built on Feb. 6, 2021, 9:14 a.m.