
phyDat
format.phyDat(data, levels, return.index=FALSE)
phyDat.DNA(data, return.index=FALSE)
## S3 method for class 'DNAbin':
as.phyDat(data, ...)
## S3 method for class 'phyDat':
as.character(x, ...)
## S3 method for class 'phyDat':
as.data.frame(x, ...)
phyDat
.phyDat
.
You may import data with read.dna
or read.nexus.data
.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)
Run the code above in your browser using DataLab