Read a subtarget based on country
readd_by_country.Rd
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.
Usage
readd_by_country(
target,
country,
alloc_and_eff_couns_trgt = PFUWorkflow::target_names$alloc_and_eff_couns,
cache_path = PFUWorkflow::cache_info$cache_path
)
Arguments
- target
The name of the drake target as a string. See
get_plan()
for names of targets.- country
The 3-letter ISO abbreviation (a string) of the country (or vector of 3-letter countries) for whom
target
is to be readd from the drake cache.- alloc_and_eff_couns_trgt
- cache_path