From 315d7b8274db8bc50f3b1fca5e4283701b516abe Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Fri, 20 Sep 2024 22:30:06 -0500 Subject: [PATCH] straggler --- R/stub.R | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/R/stub.R b/R/stub.R index 0a30b07..322aaa1 100644 --- a/R/stub.R +++ b/R/stub.R @@ -204,9 +204,44 @@ check_boolean_radio <- function (d) { # d = d_metadata fail <- d$select_choices_or_calculations == simple_boolean fail <- dplyr::coalesce(fail, FALSE) !fail - } +f <- function(df) { + browser() + strsplit(df$select_choices_or_calculations, "|", fixed = TRUE) +} +check_boolean_reverse <- function (d) { # d = d_metadata + tokens <- c("0, Yes", "0, No") + # b <- + d |> + dplyr::select( + field_name, + select_choices_or_calculations, + ) |> + tidyr::nest( + data = select_choices_or_calculations, + .by = field_name + ) |> + dplyr::mutate( + # a = + # lapply( + # data, + # f + # ) + a = + purrr::map( + data, + f + ) + ) #|> + # tidyr::(a) + +} +e <- +d_metadata$select_choices_or_calculations[19] |> + strsplit("|", fixed = TRUE) |> + tibble::tibble(d = _) +e[[1]][[1]] # load_checks2 <- function() { d_metadata <- read_metadata() #|>