View source: R/utility_functions.R
readd_by_country | R Documentation |
It is sometimes convenient to read a target out of the drake cache by country (or countries).
Technically, this process involves reading a sub-target,
because the plans created by get_plan()
are all mapped by country.
But subtargets are extracted based on country index in the cache rather than country name, and
it is cumbersome to keep track of cache indices for countries.
This function de-references the indices based on the value of country
and extracts
the correct subtarget.
readd_by_country( target, country, alloc_and_eff_couns_trgt = PFUWorkflow::target_names$alloc_and_eff_couns, cache_path = PFUWorkflow::cache_info$cache_path )
target |
The name of the drake target as a string. See |
country |
The 3-letter ISO abbreviation (a string) of the country
(or vector of 3-letter countries)
for whom |
alloc_and_eff_couns_trgt |
See |
cache_path |
See |
the country-specific version of target
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.