as.phyDat-methods: Coerces an object to a 'phyDat' object

Description Usage Arguments Details Value Methods Examples

Description

This function coerces Dna object to phyDat {phangorn} object .

Usage

1
2
## S4 method for signature 'Dna'
as.phyDat(x, indels="sic",...)

Arguments

x

an object of class Dna.

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 as.phyDat.

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 a phyDat object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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

haplotypes documentation built on Feb. 28, 2020, 5:08 p.m.