View source: R/phylopars_main.R
write.phylopars | R Documentation |
Writes data and tree files for Python phylopars compatibility.
write.phylopars(trait_data, tree, data_file, tree_file, species_identifier = "species")
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 |
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 |
Eric W. Goolsby eric.goolsby.evolution@gmail.com
Bruggeman J, Heringa J and Brandt BW. (2009) PhyloPars: estimation of missing parameter values using phylogeny. Nucleic Acids Research 37: W179-W184.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.