phyDat {phangorn} | R Documentation |
These functions transform several DNA formats into the phyDat
format.
phyDat(data, levels, return.index=FALSE) phyDat.DNA(data, return.index=FALSE) as.phyDat.DNAbin(data, ...) ## S3 method for class 'phyDat': as.character(x, ...) ## S3 method for class 'phyDat': as.data.frame(x, ...)
data |
An object containing sequences. |
levels |
Level atttributes. |
return.index |
If TRUE returns a index of the site patterns. |
x |
An object of class phyDat . |
... |
further arguments passed to or from other methods. |
The functions return an object of class phyDat
.
You may import data with read.dna
or read.nexus.data
.
Klaus Schliep K.P.Schliep@massey.ac.nz
as.DNAbin
, read.dna
and read.nexus.data
data(Laurasiatherian) class(Laurasiatherian) Laurasiatherian # transform into old ape format LauraChar <- as.character(Laurasiatherian) # and back Laura <- phyDat.DNA(LauraChar, return.index=TRUE) all.equal(Laurasiatherian, Laura)