diff --git a/data-raw/derive_single_dose.R b/data-raw/create_ex_single.R similarity index 100% rename from data-raw/derive_single_dose.R rename to data-raw/create_ex_single.R diff --git a/data-raw/example_qs.R b/data-raw/create_example_qs.R similarity index 100% rename from data-raw/example_qs.R rename to data-raw/create_example_qs.R diff --git a/data-raw/example_query_source.R b/data-raw/create_queries_and_queries_mh.R similarity index 93% rename from data-raw/example_query_source.R rename to data-raw/create_queries_and_queries_mh.R index b598fe62af..e63259ff2b 100644 --- a/data-raw/example_query_source.R +++ b/data-raw/create_queries_and_queries_mh.R @@ -54,13 +54,20 @@ adae <- tibble::tribble( "APPLICATION SITE ERYTHEMA", "Application site erythema", 1 ) +# create queries.rda in data/ +usethis::use_data(queries, overwrite = TRUE) + # try below: derive_vars_query(adae, queries) - # example to use for ADMH: queries_mh <- queries %>% filter(SRCVAR %in% c("AELLT", "AEDECOD")) %>% mutate(SRCVAR = ifelse(SRCVAR == "AELLT", "MHLLT", "MHDECOD")) +usethis::use_data(queries_mh, overwrite = TRUE) + +source("inst/templates/ad_admh.R", echo = TRUE) # nolint + +# Currently producing an error derive_vars_query(admh, queries_mh) diff --git a/data/queries.rda b/data/queries.rda index 60234d13e3..cb7fbfb63d 100644 Binary files a/data/queries.rda and b/data/queries.rda differ diff --git a/data/queries_mh.rda b/data/queries_mh.rda index d186f5793d..09a3f843dd 100644 Binary files a/data/queries_mh.rda and b/data/queries_mh.rda differ