From 5da79bb532fc544a24cae7547f45740384d7cb83 Mon Sep 17 00:00:00 2001 From: yjunechoe Date: Sun, 4 Aug 2024 13:24:55 +0900 Subject: [PATCH] check for tbl_checked before sundering --- R/get_sundered_data.R | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/R/get_sundered_data.R b/R/get_sundered_data.R index 066565b62..808b742b7 100644 --- a/R/get_sundered_data.R +++ b/R/get_sundered_data.R @@ -268,6 +268,14 @@ get_sundered_data <- function( ) } + # Stop function if `tbl_checked` is not present + if (!"tbl_checked" %in% colnames(agent$validation_set)) { + stop( + "`agent` is missing `tbl_checked` information required for sundering. ", + "See `?interrogate`." + ) + } + # Get the row count of the input table row_count_input_tbl <- input_tbl %>%