Learn R Programming

phylotools (version 0.1.2)

dat2phy: Convert dataframe to phylip format

Description

Convert dataframe to phylip format

Usage

dat2phy(input, write = TRUE)

Arguments

input
dataframe with the first column the names of the sequence's and the second column the sequences
write
Write the file to disk.

Value

A vector of phylip format.

Details

Convert dataframe to phylip format, whose first column are the names of the sequence's and the second column the sequences

References

Kress W., Erickson D., Jones F., Swenson N., Perez R., Sanjur O., Bermingham E., Plant DNA barcodes and community phylogeny of a tropical forest dynamics plot in Panama. Proceedings of the National Academy of Sciences of the United States of America. 2009 18621-18626

See Also

See Also phy2dat

Examples

Run this code

##dat2phy example ########
##Convert dataframe to phylip object
dir <- system.file("extdata", package = "phylotools")
setwd(dir)
test <- read.phylip("matK.phy")
test2 <- phy2dat(test)
dat2phy(test2)

Run the code above in your browser using DataLab