Skip to contents

Helper function to get option

Usage

diseasyoption(option, class = "DiseasystoreBase")

Arguments

option

(character)
Name of the option to get

class

(character or R6::R6class Diseasy* instance)
Either the classname or the object the option applies to.

Value

The most specific option within the diseasy framework for the given option and class

Examples

  # Retrieve default option for source conn
  diseasyoption("source_conn")
#> NULL

  # Retrieve DiseasystoreGoogleCovid19 specific option for source conn
  diseasyoption("source_conn", "DiseasystoreGoogleCovid19")
#> [1] "https://storage.googleapis.com/covid19-open-data/v3/"

  # Try to retrieve specific option for source conn for a non existant / unconfigured diseasystore
  diseasyoption("source_conn", "DiseasystoreNonExistent") # Returns default source_conn
#> NULL