Skip to contents

'get_public_disease_list' reads the public list from a given CSV file or uses the default diseases if the file doesn't exist.

Usage

get_public_disease_list(filepath, default_diseases)

Arguments

filepath

Filepath. Public 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 public disease list file must contain two columns that map the EpiTrax disease name to a public-facing name for the public report.

Examples

# Using default list (when file doesn't exist)
default_list <- c("Measles", "Chickenpox")
disease_list <- get_public_disease_list("", default_list)
#> Warning: You have not provided a disease list for public 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 columns named
#> 
#> 	'EpiTrax_name' and 'Public_name'

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