as.phyDat-methods {haplotypes} | R Documentation |
Coerces an object to a phyDat
object
Description
This function coerces Dna
object to phyDat
{phangorn}
object .
Usage
## S4 method for signature 'Dna'
as.phyDat(x, indels="sic",...)
Arguments
x |
an object of class |
indels |
the indel coding method to be used. This must be one of "sic", "5th" or "missing". Any unambiguous substring can be given. See also ‘Details’ |
... |
additional arguments to |
Details
Available indel coding methods:
sic
:Treating gaps as a missing character and coding them separately following the simple indel coding method.
5th
:Treating gaps as a fifth state character.
missing
:Treating gaps as a missing character.
Value
an object of class phyDat.
Methods
signature(x = "Dna")
-
coerces a
Dna
object to aphyDat
object.
Examples
data("dna.obj")
x<-dna.obj
## Coercing a Dna object to a phyDat object.
# Simple indel coding.
phyd<-as.phyDat(x)
phyd
# Gaps as 5th state characters.
phyd<-as.phyDat(x,indels="5")
phyd
# Gaps as 5th state characters.
phyd<-as.phyDat(x,indels="m")
phyd
[Package haplotypes version 1.1.3.1 Index]