R/mermaid_import_check_options.R
mermaid_import_check_options.Rd
Check that your data matches allowed field options for importing data for a given method into MERMAID.
mermaid_import_check_options(data, options, field)
Data to be imported into MERMAID.
Field options for the same method as data
, from mermaid_import_get_template_and_options
.
Field to check options for (from options
).
if (FALSE) { # \dontrun{
library(tibble)
projects <- mermaid_get_my_projects()
options_and_template <- projects %>%
head(1) %>%
mermaid_import_get_template_and_options("fishbelt")
data <- tibble(Visibility = c("<1m - bad", "10+m - exellent"))
data %>%
mermaid_import_check_options(options_and_template, "Visibility")
# • Some errors in values of `Visibility` - please check table below
# # A tibble: 2 × 3
# data_value closest_choice match
# <chr> <chr> <lgl>
# 1 10+m - exellent 10+m - excellent FALSE
# 2 <1m - bad <1m - bad TRUE
} # }