better_model_matrix: Creates a much nicer formatted design matrix than the default...

Description Usage Arguments Value

View source: R/util_functions.R

Description

I made this function because the way the model.matrix function creates a desing matrix, can cause issues with differential gene expression tools, such as edgeR, DESeq2, and limma. If the intercept column is included, it first removes the parens and parens from the intercept column and then removing the variable name from the colnames and replaces them with factor level vs reference level syntax. If the design is specified without an intercept, variable concatentation is simply removed.

Usage

1
better_model_matrix(..., data, show_warnings = TRUE)

Arguments

...

formula with outcome as first variable

data

data.frame

show_warnings

logical whether to show wanrings

Value

model.matrix


lefeverde/basicOmics documentation built on Feb. 28, 2021, 11:03 p.m.