Get hub configuration fields from a <config>
class object
Source: R/utils-get_config.R
get_config_derived_task_ids.Rd
Get hub configuration fields from a <config>
class object
Arguments
- config_tasks
a list version of the content's of a hub's
tasks.json
config file, accessed through the"config_tasks"
attribute of a<hub_connection>
object or functionhubUtils::read_config()
.- round_id
Character string. Round identifier. If the round is set to
round_id_from_variable: true
, IDs are values of the task ID defined in the round'sround_id
property ofconfig_tasks
. Otherwise should match round'sround_id
value in config. Ignored if hub contains only a single round.
Value
get_config_derived_task_ids
: character vector of hub or round level derived task ID names. Ifround_id
isNULL
or the round does not have a round levelderived_tasks_ids
setting, returns the hub levelderived_tasks_ids
setting.
Examples
hub_path <- system.file("testhubs/v4/flusight", package = "hubUtils")
config_tasks <- read_config(hub_path)
get_config_derived_task_ids(config_tasks)
#> [1] "target_date"
get_config_derived_task_ids(config_tasks, round_id = "2023-05-08")
#> [1] "target_date"