as.data.frame-methods {haplotypes} | R 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 |
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)
[Package haplotypes version 1.1.3.1 Index]