Skip to contents

'prep_report_data' removes rows from the data that shouldn't appear in the report and adds rows for diseases that should be in the report, but weren't in the input dataset. Added rows are filled with 0s.

Usage

prep_report_data(data, report_d_list)

Arguments

data

Dataframe. Current report data.

report_d_list

String vector. Diseases to include in the report.

Value

Report data with rows for all diseases to report.

Examples

df <- data.frame(disease=c("A","B","D"), counts=c(5,7,8))
prep_report_data(df, c("A","C"))
#>   disease counts
#> 1       A      5
#> 2       C      0