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

View source: R/snpArrayToMatrix.R

snpArrayToMatrixR Documentation

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, ...)

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

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 29, 2024, 12:33 p.m.