This function centralizes digging through the configurations list into one place. Given a parameter name and (optionally) a scope, it will find the parameter and return it. If no such parameter can be found then a NULL value is returned. The idea here is that get_cluster_configs has already been used to read the configuration file.

get_cluster_param(configs, parameter, scope, default = NULL)

Arguments

configs

List. Cluster configurations, usually obtained using a call to get_cluster_configs.

parameter

Character. The name of the parameter of interest.

scope

Charcter. The scope of the configurations of interest. The configuration YAML may be organized by various headings.

default

Any Type. This is the return value in the event that no parameter is found. This is useful, for example, if looking for a value you expect to be TRUE or FALSE and you want to default to one of those if the parameter is not found.

Details

In the event that multiple configurations match the requested parameter (e.g., there exist parameters in different scopes with the same name) then all matches will be returned provided they are at the same level of nestedness.