Convert dataframe to phylip format

Share:

Description

Convert dataframe to phylip format

Usage

1
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.

Details

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

Value

A vector of phylip format.

Note

None

Author(s)

Jinlong Zhang jinlongzhang01@gmail.com

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

1
2
3
4
5
6
7
##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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.