Setup EpiTrax object with configuration and disease lists
setup_epitrax.Rd
setup_epitrax
initializes an EpiTrax object with configuration and report
disease lists. It is a convenience function that combines get_epitrax
,
epitrax_set_config_from_file
, and epitrax_add_report_diseases
.
Usage
setup_epitrax(
epitrax_file = NULL,
disease_list_files = NULL,
config_list = NULL,
config_file = NULL
)
Arguments
- epitrax_file
Optional path to the EpiTrax data file. Data file should be a CSV. If omitted, the user will be prompted to choose a file interactively.
- disease_list_files
Optional list containing filepaths to internal and public report disease lists. If omitted, the default lists will be used and a warning will be thrown.
- config_list, config_file
Configuration options may be specified as a list or as a path to a YAML config file, respectively. Only one can be specified at a time. If both are specified, the function will return an error. If both are omitted, the default config values will be used.
Examples
data_file <- system.file("sample_data/sample_epitrax_data.csv",
package = "epitraxr")
disease_lists <- list(
internal = system.file("tinytest/test_files/disease_lists/internal_list.csv",
package = "epitraxr"),
public = system.file("tinytest/test_files/disease_lists/public_list.csv",
package = "epitraxr")
)
epitrax <- setup_epitrax(
epitrax_file = data_file,
disease_list_files = disease_lists
)