Skip to content

Commit 0f03a31

Browse files
committed
address latest comments
1 parent 61f3dad commit 0f03a31

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

R/get_webtext.R

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ check_hospital_reporting_latency <- function(
3333

3434
percent_hosp_reporting_below80 <- forecasttools::pull_data_cdc_gov_dataset(
3535
dataset = "mpgq-jmmr",
36-
columns = c(reporting_column),
36+
columns = reporting_column,
3737
start_date = "2024-11-09"
3838
) |>
3939
dplyr::mutate(
@@ -86,15 +86,11 @@ check_hospital_reporting_latency <- function(
8686
reporting_rate_flag <- if (
8787
length(latest_reporting_below80$location_name) > 0
8888
) {
89-
location_list <- if (length(latest_reporting_below80$location_name) < 3) {
90-
glue::glue_collapse(latest_reporting_below80$location_name, sep = " and ")
91-
} else {
92-
glue::glue_collapse(
93-
latest_reporting_below80$location_name,
94-
sep = ", ",
95-
last = ", and "
96-
)
97-
}
89+
location_list <- cli::ansi_collapse(
90+
latest_reporting_below80$location_name,
91+
sep = ", ",
92+
last = ", and "
93+
)
9894

9995
glue::glue(
10096
"The following jurisdictions had <80% of hospitals reporting for ",

0 commit comments

Comments
 (0)