const.mod: Construct model matrix

Description Usage Arguments Value Examples

View source: R/preprocessing.R

Description

Using a list of covarietes, constructs a model matrix to be used in a model

Usage

1
const.mod(covs)

Arguments

covs

a list of covarietes

Value

a dataframe that can be used as a design matrix in a model

Examples

1
2
3
4
5
6
mycovs <- list(batch = sample(c(0, 1), 6, replace = TRUE),
array = as.factor(sample(c('a', 'b', 'c'), 6, replace = TRUE)),
day = sample(c(0, 1, 3), 6, replace = TRUE))
des_mat <- const.mod(mycovs)
print(mycovs)
print(des_mat)

mdonertas/hetAge documentation built on Jan. 2, 2020, 12:53 a.m.