R/summary.R

#' Output analyses
#'
#' Output analysis plan specified in the json file
#'
#' @param object A pipeline_study list object created with pipeline()
#' @param ... Section names from the options: hypotheses, analyses, results
#' @return The study object
#'
#' @export
#'
summary.pipeline_study <- function(object, ...) {
  section_options <- c("hypotheses", "analyses", "results")
  sections <- intersect(section_options, c(...))

  for (sec in sections) {
    if (sec == "hypotheses") output_hypotheses(object)
    if (sec == "analyses") output_analyses(object)
    if (sec == "results") output_results(object)
  }

  invisible(object)
}
debruine/pipeline documentation built on May 8, 2019, 8:59 a.m.