Resolution order:
Local RDS/CSV files in standard project locations
SQLite cache (
data/cache/morie.db)CKAN API fetch (requires internet)
Examples
# Local-first and offline: use_ckan = FALSE consults the bundled copy
# and the local cache only, and errors when neither is present.
cpads <- try(morie_load_cpads(use_ckan = FALSE), silent = TRUE)
if (!inherits(cpads, "try-error")) head(cpads)
if (FALSE) { # \dontrun{
# The live CKAN fetch pages through the datastore; it ran for over ten
# minutes in the docs build, so it is shown rather than executed.
cpads <- morie_load_cpads(use_ckan = TRUE)
if (!is.null(cpads)) head(cpads)
} # }
