From 54e3b433f71100ff4f59489a4da52184fe969f75 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Thu, 24 Feb 2022 15:57:27 +0100 Subject: [PATCH] analyze: Allow to exclude detailed results --- R/analyze.R | 6 ++++-- man/analyze.Rd | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/R/analyze.R b/R/analyze.R index e5a47ee..b17dbc8 100644 --- a/R/analyze.R +++ b/R/analyze.R @@ -5,6 +5,8 @@ #' function should accept a number between 0.0 and 1.0 for the current #' progress. If no function is provided, a simple text progress bar will be #' shown. +#' @param include_results Whether to include the detailed results. If this is +#' set to `FALSE`, only the `scores` are available. #' #' @returns An object containing the results of the analysis with the following #' items: @@ -15,7 +17,7 @@ #' } #' #' @export -analyze <- function(preset, progress = NULL) { +analyze <- function(preset, progress = NULL, include_results = TRUE) { if (!inherits(preset, "geposan_preset")) { stop("Preset is invalid. Use geposan::preset() to create one.") } @@ -60,7 +62,7 @@ analyze <- function(preset, progress = NULL) { list( preset = preset, scores = scores, - results = results + results = if (include_results) results else NULL ), class = "geposan_analysis" ) diff --git a/man/analyze.Rd b/man/analyze.Rd index 600eb04..695c013 100644 --- a/man/analyze.Rd +++ b/man/analyze.Rd @@ -4,7 +4,7 @@ \alias{analyze} \title{Analyze genes based on position data.} \usage{ -analyze(preset, progress = NULL) +analyze(preset, progress = NULL, include_results = TRUE) } \arguments{ \item{preset}{The preset to use which should be created using \code{\link[=preset]{preset()}}.} @@ -13,6 +13,9 @@ analyze(preset, progress = NULL) function should accept a number between 0.0 and 1.0 for the current progress. If no function is provided, a simple text progress bar will be shown.} + +\item{include_results}{Whether to include the detailed results. If this is +set to \code{FALSE}, only the \code{scores} are available.} } \value{ An object containing the results of the analysis with the following