Skip to content

Commit

Permalink
enh: add param recording escape hatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajic committed Oct 3, 2024
1 parent 5f7645b commit 1a94574
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/function_logging.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @param description description of function run
#' @param return_gobject logical. Whether the giotto object should be returned
#' @param toplevel expected relative stackframe where call that is being
#' recorded was made
#' recorded was made. If negative, param recording is skipped
#' @returns giotto object or list of parameters
#' @examples
#' g <- GiottoData::loadGiottoMini("visium")
Expand All @@ -22,6 +22,8 @@ update_giotto_params <- function(gobject,
description = "_test",
return_gobject = TRUE,
toplevel = 2) {
if (toplevel < 0) return(gobject) # skip if toplevel negative

parameters_list <- gobject@parameters
number_of_rounds <- length(parameters_list)
update_name <- paste0(number_of_rounds, description)
Expand Down

0 comments on commit 1a94574

Please sign in to comment.