Skip to contents

'get_internal_disease_list' reads the internal list from a given CSV file or uses the default diseases, if the file doesn't exist.

Usage

get_internal_disease_list(filepath, default_diseases)

Arguments

filepath

Filepath. Internal disease list CSV file.

default_diseases

String vector. List of default diseases to use if the above file doesn't exist.

Value

A dataframe containing the diseases to include in the public report and the name to use for each disease in the public report.

Details

The provided internal disease list file must contain one column of EpiTrax disease names (EpiTrax_name) to include in internal reports.

Examples

# Using default list (when file doesn't exist)
default_list <- c("Measles", "Chickenpox")
disease_list <- get_internal_disease_list("", default_list)
#> Warning: You have not provided a disease list for internal reports.
#>  - The program will default to using only the diseases found in the input dataset.
#>  - If you would like to use a different list, please include a file with a column named
#> 
#> 	'EpiTrax_name'

# Using a disease list file
list_file <- system.file("tinytest/test_files/disease_lists/internal_list.csv",
                        package = "epitraxr")
disease_list <- get_internal_disease_list(list_file, default_list)