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

Description Usage Arguments Value Methods Examples

Description

Coerces an object to a data.frame.

Usage

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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 Feb. 28, 2020, 5:08 p.m.