DGCA (version 1.0.3)

getGroupsFromDesign: Split input matrix(es) based on the design matrix.

Description

This function splits the input matrix(es) based on a design matrix, into a named list of subsetted matrices. If the design matrix has no names, this function will create names for the resulting list of matrices.

Usage

getGroupsFromDesign(inputMat, design, inputMatB = NULL, secondMat = FALSE)

Value

A list whose first element is a list of subsetted matrices and whose second element is a list of group names.

Arguments

inputMat

Input (e.g., expression) matrix which will be subsetted.

design

Standard design matrix, must specify at least two conditions. For more info, see ?model.matrix

inputMatB

Optional input (e.g., expression) matrix which will be subsetted in the same way.

secondMat

Logical value indicating whether there is a second input matrix to be subsetted.

Examples

Run this code
data(darmanis); data(design_mat); darmanis_subset = darmanis[1:30, ]
groups_from_design = getGroupsFromDesign(inputMat = darmanis_subset, design = design_mat)
str(groups_from_design)

Run the code above in your browser using DataLab