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

View source: R/phylopars_main.R

write.phyloparsR Documentation

Write data and tree files for Python phylopars compatability.

Description

Writes data and tree files for Python phylopars compatibility.

Usage

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

## 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 May 29, 2024, 7:08 a.m.