data-raw/quantity_spec.R

# Quantity Report Data Spec for building database

library(magrittr)

quantity_tables <- readxl::read_excel("data-raw/quantity-tables.xlsx",
                                      sheet = "tables",
                                      col_types = c(rep("text", 4), "logical"))

quantity_fields <- readxl::read_excel("data-raw/quantity-tables.xlsx",
                                      sheet = "fields",
                                      col_types = c(rep("text", 5), "logical", rep("text", 2), "logical")) %>%
  dplyr::mutate(safe_name = dplyr::coalesce(safe_name, snake_name))

quantity_spec <- list(tables = quantity_tables,
                      fields = quantity_fields)


usethis::use_data(quantity_spec, overwrite = TRUE)
Technomics/readflexfile documentation built on Jan. 10, 2024, 6:25 p.m.