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

as.DNAbin-methodsR Documentation

Coerces an object to a DNAbin object

Description

This function coerces Dna object to DNAbin {ape} object .

Usage

## S4 method for signature 'Dna'
as.DNAbin(x, endgaps=TRUE)

Arguments

x

an object of class Dna.

endgaps

boolean; gaps at the end of the sequences are included if this is TRUE.

Value

an object of class DNAbin.

Methods

signature(x = "Dna")

coerces a Dna object to a DNAbin object.

Examples


## Coercing a Dna object to a DNAbin object.
data("dna.obj")

x<-dna.obj
dBin<-as.DNAbin(x)
dBin

#gaps at the end removed
dBin<-as.DNAbin(x, endgaps=FALSE)
dBin



haplotypes documentation built on July 26, 2023, 5:22 p.m.