Check that your data matches allowed field options for importing data for a given method into MERMAID.

mermaid_import_check_options(data, options, field)

Arguments

data

Data to be imported into MERMAID.

options

Field options for the same method as data, from mermaid_import_get_template_and_options.

field

Field to check options for (from options).

Examples

if (FALSE) {
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
}