Learn R Programming

ACNE (version 0.9.1)

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

Description

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

Usage

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

Value

Returns a Lx2xI array or a 2LxI matrix.

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.

Examples

Run this code
Y <- matrix(rnorm(200), nrow=20, ncol=10)
str(Y)

V <- snpMatrixToArray(Y)
str(V)

Y2 <- snpArrayToMatrix(V)
str(Y2)

stopifnot(identical(Y2, Y))

Run the code above in your browser using DataLab