as.data.frame-methods: Coerces a 'Dna' object to a data.frame

as.data.frame-methodsR Documentation

Coerces a Dna object to a data.frame

Description

Coerces an object to a data.frame.

Usage

## S4 method for signature 'Dna'
as.data.frame(x)

Arguments

x

an object of class Dna.

Value

returns a data frame.

Methods

signature(x = "Dna")

coerces a Dna object to a data.frame.

Examples


data("dna.obj")

x<-dna.obj
x<-as.dna(x[1:4,1:6])

## Coercing a 'Dna' object to a data.frame.
df<-as.data.frame(x)
df

# TRUE
is.data.frame(df) 

## Not run: 
# gives the same result 
df<-as.data.frame(x@sequence) 
df

## End(Not run)

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