View source: R/edgeR-slurm-lsf.R
checkContrastNames | R Documentation |
Check a contrast matrix to make sure that it is likely o.k.
checkContrastNames(contrastMatrix, action = c("message", "warning", "error"))
contrastMatrix |
A contrast matrix |
action |
Character strings, the action to perform in case the names show irregularities Right now, the function checks no column names contain the equal sign. |
testDesign <- cbind(Control=rep(1,8), Treatment=rep(c(0,1),4), Batch=rep(c(0, 1), each=4))
problemContrast <- limma::makeContrasts("Treatment"="Treatment",
"Batch=Batch", ## problematic
levels=testDesign)
checkContrastNames(problemContrast, action="message")
if(requireNamespace("testthat")) {
testthat::expect_warning(checkContrastNames(problemContrast,
action="warning"))
testthat::expect_error(checkContrastNames(problemContrast,
action="error"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.