annMat2Long: Transform annmatrix Object to Long Format

Description Usage Arguments Value Author(s) Examples

Description

Turns the matrix and it's column and row meta-data into a long-format data.frame.

Usage

1

Arguments

x

annmatrix object

...

other parameters passed to data.frame()

Value

a data.frame

Author(s)

Karolis Koncevičius

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# construct the annmatrix object
coldata <- data.frame(group=c(rep("case", 20), rep("control", 20)),
                      gender=sample(c("M", "F"), 40, replace=TRUE)
                      )
rowdata <- data.frame(chr=sample(c("chr1", "chr2"), 100, replace=TRUE),
                         pos=runif(100, 0, 1000000)
                         )
annMat <- annmatrix(matrix(rnorm(100*40), 100, 40), rowdata, coldata)

annmat2long(annMat)

KKPMW/annmatrix documentation built on May 27, 2019, 11:42 a.m.