diff --git a/R/metacore.R b/R/metacore.R index 7929bed..0386762 100644 --- a/R/metacore.R +++ b/R/metacore.R @@ -313,7 +313,7 @@ select_dataset <- function(.data, dataset, simplify = FALSE) { get_control_term <- function(metacode, variable, dataset = NULL){ var_str <- ifelse(mode(enexpr(variable)) == "character", variable, as_label(enexpr(variable))) - dataset_val <- ifelse(class(enexpr(dataset)) == "character", + dataset_val <- ifelse(mode(enexpr(dataset)) == "character", dataset, as_label(enexpr(dataset))) # to make the filter more explicit if(dataset_val == "NULL"){ var_code_id <- metacode$value_spec %>%