Skip to content

Commit fa4315e

Browse files
committed
better collection_weeks message
1 parent 09de59a commit fa4315e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

R/endpoints.R

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,12 @@ pub_covid_hosp_facility <- function(
201201
# Confusingly, the endpoint expects `collection_weeks` to be in day format,
202202
# but correspond to epiweeks. Allow `collection_weeks` to be provided in
203203
# either day or week format.
204-
coercion_msg <- glue::glue(
205-
c(
206-
"`collection_weeks` {collection_weeks} is in week format but
207-
`pub_covid_hosp_facility` expects day format; dates will be automatically
208-
converted to day format"
204+
coercion_msg <- c(
205+
"`collection_weeks` is in week format but `pub_covid_hosp_facility`
206+
expects day format; dates will be converted to day format but may not
207+
correspond exactly to desired time range"
209208
)
210-
)
209+
211210
if (test_class(collection_weeks, "EpiRange") && nchar(collection_weeks$from) == 6) {
212211
cli::cli_warn(coercion_msg, class = "epidatr__epirange_week_coercion")
213212
collection_weeks <- reformat_epirange(collection_weeks, to_type = "day")

0 commit comments

Comments
 (0)