Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print an output even if there is not inconsistent sequence of dates #150

Open
avallecam opened this issue Jun 25, 2024 · 0 comments
Open

Comments

@avallecam
Copy link
Member

avallecam commented Jun 25, 2024

Is your feature request related to a problem? Please describe.

Data with no sequence inconsistent does not generate an output. Having no message printed does not inform clearly that there is not inconsistency.

See reprex:

library(tibble)
library(cleanepi)

data_good <- tibble::tribble(
  ~case_id, ~date_of_infection, ~date_of_onset,
  "53371b",       "2014-04-09",   "2014-04-15",
  "f5c3d8",       "2014-04-18",   "2014-04-21",
  "0f58c4",       "2014-04-22",   "2014-04-26"
)

data_bad <- tibble::tribble(
  ~case_id, ~date_of_infection, ~date_of_onset,
  "53371b",       "2014-04-09",   "2014-04-15",
  "f5c3d8",       "2014-04-18",   "2014-04-14",
  "0f58c4",       "2014-04-22",   "2014-04-26"
)

output_bad <- cleanepi::check_date_sequence(
  data = data_bad,
  target_columns = c("date_of_infection", "date_of_onset")
)
#> Warning: Detected 1 incorrect date sequences at line(s): 2


output_good <- cleanepi::check_date_sequence(
  data = data_good,
  target_columns = c("date_of_infection", "date_of_onset")
)

Created on 2024-06-25 with reprex v2.1.0

Describe the solution you'd like

A printed message like Warning: Detected 0 incorrect date sequences or similar

Additional context
Detected during training by participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant