as.list-methods | R Documentation |
as.list
in the Package haplotypesCoerces an object to a list.
## S4 method for signature 'Dna'
as.list(x)
## S4 method for signature 'Haplotype'
as.list(x)
## S4 method for signature 'Parsimnet'
as.list(x)
x |
an object of class |
If x
is a Dna
object, elements of the list are character vectors that contains the DNA sequences of length equal to corresponding value in the slot seqlengths
. If x
is Haplotype
or Parsimnet
objects, slots are converted to list elements.
returns a list.
signature(x = "Dna")
coerces an object of class Dna to a list.
signature(x = "Haplotype")
coerces an object of class Haplotype to a list.
signature(x = "Parsimnet")
coerces an object of class Parsimnet to a list.
data("dna.obj")
## Coercing a 'Dna' object to a list.
x<-dna.obj[1:3,as.matrix=FALSE]
as.list(x)
## Not run:
## Coercing a 'Haplotype' object to a list.
x<-dna.obj
h<-haplotype(x)
as.list(h)
## Coercing a 'Parsimnet' object to a list.
x<-dna.obj
p<-parsimnet(x)
as.list(p)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.