Skip to content

Commit c5b41f3

Browse files
committed
update threshold to new format
1 parent e949a4a commit c5b41f3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/target-data_utils.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ standard_nhsn <- function(df, location2number, abbr2location,
154154
.data[["report"]]),
155155
.by = c("date", "state_abbr", "pathogen"))
156156
if (!is.null(report_limit)) {
157+
if (range(df$report, na.rm = TRUE)[2] > 1)
158+
report_limit <- report_limit * 100
157159
df <-
158160
dplyr::mutate(df, observation = ifelse(.data[["report"]] < report_limit &
159161
!is.na(.data[["report"]]),

0 commit comments

Comments
 (0)