snpArrayToMatrix: Reshapes SNP data in matrix form to array form and vice versa

Description Usage Arguments Value Examples

Description

Reshapes SNP data in matrix form to array form and vice versa.

Usage

1
snpArrayToMatrix(Y, dropNames=TRUE, ...)

Arguments

Y

A 2LxI matrix or a Lx2xI array, where L is the number of probe pairs and I is the number of arrays.

dropNames

If TRUE, dimension names are dropped, otherwise preserved.

...

Not used.

Value

Returns a Lx2xI array or a 2LxI matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Y <- matrix(rnorm(200), nrow=20, ncol=10)
str(Y)

V <- snpMatrixToArray(Y)
str(V)

Y2 <- snpArrayToMatrix(V)
str(Y2)

stopifnot(identical(Y2, Y))

ACNE documentation built on May 2, 2019, 1:09 p.m.