View source: R/fixDesignMatrixColnames.R
fixDesignMatrixColnames | R Documentation |
Fix design matrix colnames so that they are legal variable names
fixDesignMatrixColnames(
designMatrix,
interceptChar = "_",
removeContrastNames = TRUE
)
designMatrix |
A design matrix, produced by |
interceptChar |
Character string, the value the interaction symbol (:) should be replaced with |
removeContrastNames |
Logical, whether the contrast variable name should be removed. |
The matrix with fixed colum names.
myFac1 <- gl(6,2, labels=sprintf("Fac1_%d", 1:6))
myFac2 <- gl(2,6, labels=c("Ctrl", "Dis"))
myVar <- rnorm(12)
myDesign <- model.matrix(~myFac1 * myFac2 + myVar)
head(myDesign)
head(fixDesignMatrixColnames(myDesign))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.