phyDat {phangorn}R Documentation

Conversion amoung Sequence Formats

Description

These functions transform several DNA formats into the phyDat format.

Usage

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, ...)

Arguments

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.

Value

The functions return an object of class phyDat. You may import data with read.dna or read.nexus.data.

Author(s)

Klaus Schliep K.P.Schliep@massey.ac.nz

See Also

as.DNAbin, read.dna and read.nexus.data

Examples

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)


[Package phangorn version 0.0-1 Index]