as.matrix-varPartResults-method: Convert to matrix

Description Usage Arguments Value Examples

Description

Convert varPartResults to matrix

Usage

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

Arguments

x

varPartResults

...

other arguments.

Value

matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# load library
# library(variancePartition)

# load simulated data:
# geneExpr: matrix of gene expression values
# info: information/metadata about each sample
data(varPartData)

# Specify variables to consider
# Age is continuous so we model it as a fixed effect
# Individual and Tissue are both categorical, so we model them as random effects
form <- ~ Age + (1|Individual) + (1|Tissue) 

# Fit model
varPart <- fitExtractVarPartModel( geneExpr[1:5,], form, info )

# convert to matrix
as.matrix(varPart)

variancePartition documentation built on Nov. 8, 2020, 5:18 p.m.