Prepare limma contrasts matrix
add_contrasts.RdCreate the contrasts matrix, for use in a limma model. This function utilizes the function limma::makeContrasts with a user provided file or vector of a list of comparisons. Note: The label on the plots is defined by what is written in the contrast statement prior to the equal sign.
Examples
if (FALSE) { # \dontrun{
# An example of a .csv file with three comparisons
data -> add_contrasts(data, contrasts_file = "path/to/file.csv")
# file info
Treatment1_vs_Control= Treatment1 - Control
Treatment2_vs_Control= Treatment2 - Control
Treatment2_vs_Treatment1= Treatment2 - Treatment1
# An example using a vector
data <- add_contrasts(contrasts_vector = c("Treat1_vs_Control=Treat1-Control",
"Treat2_vs_Control=Treat2-Control"))
} # }