as.matrix-methods: Methods for function 'as.matrix' in the Package 'haplotypes'

Description Usage Arguments Value Methods Examples

Description

Coerces an object to a matrix.

Usage

1
2
## S4 method for signature 'Dna'
as.matrix(x)

Arguments

x

an object of class Dna.

Value

returns a character matrix.

Methods

signature(x = "Dna")

coerces an object of class Dna to a matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data("dna.obj")

## Coercing a 'Dna' object to a matrix.
x<-dna.obj[1:4,1:6,as.matrix=FALSE]
x
as.matrix(x)

## Not run: 
# gives the same result
dna.obj[1:4,1:6,as.matrix=TRUE] 
## End(Not run)

haplotypes documentation built on Feb. 28, 2020, 5:08 p.m.