Skip to content

Commit

Permalink
add argument extract_tbl_checked
Browse files Browse the repository at this point in the history
  • Loading branch information
yjunechoe committed Aug 4, 2024
1 parent 4605b30 commit 1013fe2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions R/interrogate.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
#' The default is `TRUE` and further options allow for fine control of how
#' these rows are collected.
#'
#' @param extract_tbl_checked *Collect validation results from each step*
#'
#' `scalar<logical>` // *default:* `TRUE`
#'
#' An option to collect processed data frames produced by executing the
#' validation steps. This information is necessary for some functions
#' (e.g., `get_sundered_data()`), but may grow to a large size. To opt out
#' of attaching this data to the agent, set this argument to `FALSE`.
#'
#' @param get_first_n *Get the first n values*
#'
#' `scalar<integer>` // *default:* `NULL` (`optional`)
Expand Down Expand Up @@ -143,6 +152,7 @@
interrogate <- function(
agent,
extract_failed = TRUE,
extract_tbl_checked = TRUE,
get_first_n = NULL,
sample_n = NULL,
sample_frac = NULL,
Expand Down Expand Up @@ -729,6 +739,11 @@ interrogate <- function(
# all validation steps have been carried out
class(agent) <- c("has_intel", "ptblank_agent")

# Drop $tbl_checked if `extract_tbl_checked = FALSE`
if (!extract_tbl_checked) {
agent$validation_set$tbl_checked <- NULL
}

# Add the ending time to the `agent` object
agent$time_end <- Sys.time()

Expand Down
10 changes: 10 additions & 0 deletions man/interrogate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1013fe2

Please sign in to comment.