R/box.plot.test.R

Defines functions box.plot.test

box.plot.test <- function(coef_test, trainingLabel, testLabel, geneList=NULL, outPath) {
  if (is.null(geneList)) {
    nPath <- length(trainingLabel) - 1
    pathName <- names(trainingLabel)[-1]
  } else {
    nPath <- length(geneList)
    pathName <- names(geneList)
  }

  grDevices::pdf(outPath)
  for (i in 1:nPath) {
    graphics::boxplot(coef_test[, i] ~ as.factor(testLabel),
                      main = paste("box-plot of", pathName[i],
                                   "pathway activity in test samples",
                                   sep = " "))
    graphics::points(jitter(as.numeric(as.factor(testLabel)), amount = 0.2),
                     coef_test[, i], pch = 17, col = 4)
  }
  invisible(grDevices::dev.off())
}

Try the ASSIGN package in your browser

Any scripts or data that you put into this service are public.

ASSIGN documentation built on Nov. 8, 2020, 8:29 p.m.