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

Translate messages into french #196

Open
wants to merge 63 commits into
base: main
Choose a base branch
from

Conversation

Karim-Mane
Copy link
Member

Changes in this PR are related to:

  • the usage of {cli} for formatting the messages sent by the package
  • the translation of the messages in the package into French.

@Karim-Mane Karim-Mane linked an issue Nov 12, 2024 that may be closed by this pull request
Copy link

This pull request:

  • Adds 2 new dependencies (direct and indirect)
  • Adds 2 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

(Note that results may be inacurrate if you branched from an outdated version of the target branch.)

@Karim-Mane Karim-Mane requested review from bahadzie and removed request for Degoot-AM November 13, 2024 11:12
@adamkucharski
Copy link
Member

Thanks. Tagging @martinparies at Institut Louis Malarde, who may have some feedback. Can install from PR with remotes::install_github(epiverse-trace/cleanepi", ref = "pull/196/head")

@bahadzie
Copy link
Member

devtools::test() summary

[ FAIL 1 | WARN 25 | SKIP 0 | PASS 347 ]

Complete output below

devtools::test()
## ℹ Testing cleanepi
## ✔ | F W  S  OK | Context
## ⠏ |          0 | check_date_sequence                                                                                                                                                  Found the following unrecognised column name:
##                            `fake_name`! Detected 2 incorrect date sequences at lines: "6, 8".
## i Enter `attr(dat, "report")[["incorrect_date_sequence"]]` to access them, where "dat" is the object used to store the output from this operation.
## ⠹ |          3 | check_date_sequence                                                                                                                                                  Detected 2 incorrect date sequences at
##                            lines: `6, 8`Insufficient number of columns to compare.i Found the following unrecognised column name: fake_name.
## ! Detected 2 incorrect date sequences at lines: "6, 8".
## i Enter `attr(dat, "report")[["incorrect_date_sequence"]]` to access them, where "dat" is the object used to store the output from this operation.
## ✔ |         13 | check_date_sequence
## ⠏ |          0 | clean_data_helpers                                                                                                                                                   ! Found 50 <numeric> values that can also be of type <Date> in column case_id.
## ⠋ |          1 | clean_data_helpers                                                                                                                                                   i No character column found from the input data.
## ! Found 1 <numeric> value that can also be of type <Date> in column col1.
## ! Found 1 <numeric> value that can also be of type <Date> in column col1.
## ! Found 3 <numeric> values that can also be of type <Date> in column col.
## ✔ |         15 | clean_data_helpers [1.8s]
## ⠏ |          0 | clean_data                                                                                                                                                           i Cleaning column names
## i Removing constant columns and empty rows
## i Removing duplicated rows
## i No duplicates were found.
## ⠙ |   1      1 | clean_data                                                                                                                                                           i Cleaning column names
## i Replacing missing values with NA
## i Removing constant columns and empty rows
## i Removing duplicated rows
## ⠴ |   2      4 | clean_data                                                                                                                                                           i No duplicates were found.
## i Standardizing Date columns
## i Checking subject IDs format
## ! Detected incorrect subject ids at lines: "3, 5, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## i Converting `sex` into numeric
## i Performing dictionary-based cleaning
## i Checking whether date sequences are respected
## ! Detected 2 incorrect date sequences at lines: "6, 8".
## i Enter `attr(dat, "report")[["incorrect_date_sequence"]]` to access them, where "dat" is the object used to store the output from this operation.
## ⠹ |   5      8 | clean_data                                                                                                                                                           i No duplicates were found.
## ! Detected incorrect subject ids at lines: "3, 5, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## ⠼ |   6      9 | clean_data                                                                                                                                                           'target_columns' must be provided.i Cleaning column names
## i Removing constant columns and empty rows
## i Removing duplicated rows
## i No duplicates were found.
## i Checking subject IDs format
## ✔ |   7     18 | clean_data                                                                                                                                                           
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## Warning (test-clean_data.R:11:3): clean_data works as expected with the default parameters
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::clean_data(data = test_data) at test-clean_data.R:11:3
##   2. │ └─cleanepi::remove_duplicates(data, target_columns = params[["remove_duplicates"]][["target_columns"]]) at cleanepi/R/clean_data.R:189:5
##   3. │   └─cleanepi::find_duplicates(dat, target_columns) at cleanepi/R/find_and_remove_duplicates.R:39:3
##   4. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   5. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   6. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   7. ├─dplyr::arrange(., dplyr::pick(target_columns))
##   8. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##   9.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  10.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  11.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  12.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  13.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-clean_data.R:54:3): clean_data works as expected
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::clean_data(...) at test-clean_data.R:54:3
##   2. │ └─cleanepi::remove_duplicates(data, target_columns = params[["remove_duplicates"]][["target_columns"]]) at cleanepi/R/clean_data.R:189:5
##   3. │   └─cleanepi::find_duplicates(dat, target_columns) at cleanepi/R/find_and_remove_duplicates.R:39:3
##   4. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   5. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   6. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   7. ├─dplyr::arrange(., dplyr::pick(target_columns))
##   8. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##   9.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  10.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  11.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  12.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  13.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-clean_data.R:54:3): clean_data works as expected
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::clean_data(...) at test-clean_data.R:54:3
##   2. │ └─cleanepi::check_subject_ids(...) at cleanepi/R/clean_data.R:232:5
##   3. │   └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   4. │     ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##   5. │     │ └─base::withCallingHandlers(...)
##   6. │     └─cleanepi::find_duplicates(data, id_col_name)
##   7. │       └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   8. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   9. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##  10. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  11. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  12.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  13.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  14.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  15.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  16.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-clean_data.R:53:1): clean_data works as expected
## Global state has changed:
## `before[[8]]` is length 111
## `after[[8]]` is length 112                                                                                                                                                                                                                                                                                                                                                                                                                                           
## `names(before[[8]])[63:68]`: "pkgType" "printcmd" "prompt"                        "readr.show_progress" "repos" "rl_word_breaks"
## `names(after[[8]])[63:69]`:  "pkgType" "printcmd" "prompt" "readr.default_locale" "readr.show_progress" "repos" "rl_word_breaks"
## `before[[8]]$readr.default_locale` is absent
## `after[[8]]$readr.default_locale` is an S3 object of class <locale>, a list                                                                                                                                                                                                                                                                                                                                                         
## 
## Warning (test-clean_data.R:73:3): cleaned_data works in a pipable way
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─... %>% clean_using_dictionary(dictionary = test_dictionary) at test-clean_data.R:73:3
##   2. ├─cleanepi::clean_using_dictionary(., dictionary = test_dictionary)
##   3. │ └─checkmate::assert_data_frame(...) at cleanepi/R/dictionary_based_cleaning.R:38:3
##   4. │   └─checkmate::checkDataFrame(...)
##   5. │     └─... %and% checkListTypes(x, types)
##   6. │       └─base::isTRUE(lhs)
##   7. ├─cleanepi::convert_to_numeric(., target_columns = "sex", lang = "en") at cleanepi/R/dictionary_based_cleaning.R:38:3
##   8. │ └─checkmate::assert_data_frame(...) at cleanepi/R/convert_to_numeric.R:31:3
##   9. │   └─checkmate::checkDataFrame(...)
##  10. │     └─... %and% checkListTypes(x, types)
##  11. │       └─base::isTRUE(lhs)
##  12. ├─cleanepi::check_subject_ids(...) at cleanepi/R/convert_to_numeric.R:31:3
##  13. │ └─checkmate::assert_data_frame(data, null.ok = FALSE) at cleanepi/R/standardize_subject_ids.R:33:3
##  14. │   └─checkmate::checkDataFrame(...)
##  15. │     └─... %and% checkListTypes(x, types)
##  16. │       └─base::isTRUE(lhs)
##  17. ├─cleanepi::standardize_dates(...) at cleanepi/R/standardize_subject_ids.R:33:3
##  18. │ └─checkmate::assert_data_frame(data, null.ok = FALSE, min.cols = 1L) at cleanepi/R/standardize_date.R:115:3
##  19. │   └─checkmate::checkDataFrame(...)
##  20. │     └─... %and% checkListTypes(x, types)
##  21. │       └─base::isTRUE(lhs)
##  22. ├─cleanepi::remove_duplicates(., target_columns = NULL) at cleanepi/R/standardize_date.R:115:3
##  23. │ └─cleanepi::find_duplicates(dat, target_columns) at cleanepi/R/find_and_remove_duplicates.R:39:3
##  24. │   └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##  25. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##  26. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##  27. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  28. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  29.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  30.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  31.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  32.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  33.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-clean_data.R:73:3): cleaned_data works in a pipable way
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─... %>% clean_using_dictionary(dictionary = test_dictionary) at test-clean_data.R:73:3
##   2. ├─cleanepi::clean_using_dictionary(., dictionary = test_dictionary)
##   3. │ └─checkmate::assert_data_frame(...) at cleanepi/R/dictionary_based_cleaning.R:38:3
##   4. │   └─checkmate::checkDataFrame(...)
##   5. │     └─... %and% checkListTypes(x, types)
##   6. │       └─base::isTRUE(lhs)
##   7. ├─cleanepi::convert_to_numeric(., target_columns = "sex", lang = "en") at cleanepi/R/dictionary_based_cleaning.R:38:3
##   8. │ └─checkmate::assert_data_frame(...) at cleanepi/R/convert_to_numeric.R:31:3
##   9. │   └─checkmate::checkDataFrame(...)
##  10. │     └─... %and% checkListTypes(x, types)
##  11. │       └─base::isTRUE(lhs)
##  12. ├─cleanepi::check_subject_ids(...) at cleanepi/R/convert_to_numeric.R:31:3
##  13. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##  14. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##  15. │   │ └─base::withCallingHandlers(...)
##  16. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##  17. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##  18. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##  19. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##  20. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  21. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  22.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  23.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  24.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  25.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  26.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-clean_data.R:119:3): clean_data fails as expected
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─testthat::expect_error(...) at test-clean_data.R:119:3
##   2. │ └─testthat:::expect_condition_matching(...)
##   3. │   └─testthat:::quasi_capture(...)
##   4. │     ├─testthat (local) .capture(...)
##   5. │     │ └─base::withCallingHandlers(...)
##   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
##   7. ├─cleanepi::clean_data(data = test_data, standardize_subject_ids = standardize_subject_ids)
##   8. │ └─cleanepi::remove_duplicates(data, target_columns = params[["remove_duplicates"]][["target_columns"]]) at cleanepi/R/clean_data.R:189:5
##   9. │   └─cleanepi::find_duplicates(dat, target_columns) at cleanepi/R/find_and_remove_duplicates.R:39:3
##  10. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##  11. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##  12. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##  13. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  14. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  15.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  16.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  17.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  18.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  19.         └─dplyr:::signal_warnings(warnings_state, error_call)
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## ⠏ |          0 | column_name_standardization                                                                                                                                          Replace column names already existsAssertion on',keep,'failed: usage of 'linelist_tags'
##                             is only reserved for 'linelist' type of data.Assertion on',keep or rename,'failed: Only the
##                            column names from the input data can be renamed or
## ✔ |         14 | column_name_standardization
## ⠏ |          0 | convert_numeric_to_date                                                                                                                                              ✔ |         12 | convert_numeric_to_dateke_column_name' not found.
## ⠋ |          1 | convert_to_numeric                                                                                                                                                   ! Found 50 <numeric> values that can also be of type <Date> in column case_id.
## ! Found 685.5 numeric values in gender.
## i Please consider the followings:
## * converting characters into numeric, or
## * replacing the numeric values by "NA" using the `replace_missing_values()` function.
## i The following colonne will be converted into numeric: age.
## ⠹ |          3 | convert_to_numeric                                                                                                                                                   Found `3750` numeric values in `test`. Consider
##                            converting characters into numeric or replacing the
##                            numeric values by `NA` using the
##                            `replace_missing_values()` function.! Found 685.5 numeric values in gender.
## i Please consider the followings:
## * converting characters into numeric, or
## * replacing the numeric values by "NA" using the `replace_missing_values()` function.
## i The following colonne will be converted into numeric: age.
## ⠼ |          5 | convert_to_numeric                                                                                                                                                   ! Found 50 <numeric> values that can also be of type <Date> in column case_id.
## ! Found 685.5 numeric values in gender.
## i Please consider the followings:
## * converting characters into numeric, or
## * replacing the numeric values by "NA" using the `replace_missing_values()` function.
## i The following colonne will be converted into numeric: age.
## ⠇ |          9 | convert_to_numeric                                                                                                                                                   Found `3750` numeric values in `test`. Consider
##                            converting characters into numeric or replacing the
##                            numeric values by `NA` using the
##                            `replace_missing_values()` function.i The following colonne will be converted into numeric: age.
## target_columns not specified and could not be
## ✔ |         12 | convert_to_numeric [7.0s] scan_data() function.
## ✔ |          1 | dev-utils                                                                                                                                                            
## ⠏ |          0 | dictionary_based_cleaning                                                                                                                                            ! Can not replace the following values found in column gender but not defined in the dictionary: "femme".
## i You can either:
## * correct the misspelled options from the input data, or
## * add them to the dictionary using the `add_to_dictionary()` function.
## ⠹ |         23 | dictionary_based_cleaning                                                                                                                                            Can not replace the following values found in column  `gender` but not defined in the dictionary: `femme`.i You can either:
## * correct the misspelled options from the input data, or
## * add them to the dictionary using the `add_to_dictionary()` function.
## ✔ |         35 | dictionary_based_cleaninge'
## ⠏ |          0 | find_and_remove_duplicates                                                                                                                                           ! Found 57 duplicated rows in the dataset.
## i Use `attr(dat, "report")[["duplicated_rows"]]` to access them, where "dat" is the object used to store the output from this operation.
## ⠙ |   1     11 | find_and_remove_duplicates                                                                                                                                           ! Found 57 duplicated rows in the dataset.
## i Use `attr(dat, "report")[["duplicated_rows"]]` to access them, where "dat" is the object used to store the output from this operation.
## ⠼ |   3     22 | find_and_remove_duplicates                                                                                                                                           ! Found 57 duplicated rows in the dataset.
## i Use `attr(dat, "report")[["duplicated_rows"]]` to access them, where "dat" is the object used to store the output from this operation.
## ! Found 57 duplicated rows in the dataset.
## i Use `attr(dat, "report")[["duplicated_rows"]]` to access them, where "dat" is the object used to store the output from this operation.
## ⠦ |   5     32 | find_and_remove_duplicates                                                                                                                                           i No duplicates were found.
## ✔ |   6     34 | find_and_remove_duplicates
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## Warning (test-find_and_remove_duplicates.R:6:3): remove_duplicates works with 'linelist_tags'
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::remove_duplicates(data = data, target_columns = "linelist_tags") at test-find_and_remove_duplicates.R:6:3
##   2. │ └─cleanepi::find_duplicates(dat, target_columns) at cleanepi/R/find_and_remove_duplicates.R:39:3
##   3. │   └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   4. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   5. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   6. ├─dplyr::arrange(., dplyr::pick(target_columns))
##   7. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##   8.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##   9.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  10.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  11.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  12.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-find_and_remove_duplicates.R:28:3): remove_duplicates works with 'linelist_tags'
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::remove_duplicates(...) at test-find_and_remove_duplicates.R:28:3
##   2. │ └─cleanepi::find_duplicates(dat, target_columns) at cleanepi/R/find_and_remove_duplicates.R:39:3
##   3. │   └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   4. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   5. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   6. ├─dplyr::arrange(., dplyr::pick(target_columns))
##   7. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##   8.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##   9.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  10.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  11.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  12.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-find_and_remove_duplicates.R:50:3): find_duplicates works with a vector of column names
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::find_duplicates(...) at test-find_and_remove_duplicates.R:50:3
##   2. │ └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   3. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   4. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   5. ├─dplyr::arrange(., dplyr::pick(target_columns))
##   6. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##   7.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##   8.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##   9.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  10.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  11.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-find_and_remove_duplicates.R:64:3): find_duplicates works with 'linelist_tags'
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::find_duplicates(data = data, target_columns = "linelist_tags") at test-find_and_remove_duplicates.R:64:3
##   2. │ └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   3. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   4. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   5. ├─dplyr::arrange(., dplyr::pick(target_columns))
##   6. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##   7.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##   8.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##   9.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  10.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  11.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-find_and_remove_duplicates.R:78:3): find_duplicates works when target_columns = NULL
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::find_duplicates(data = data, target_columns = NULL) at test-find_and_remove_duplicates.R:78:3
##   2. │ └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   3. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   4. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   5. ├─dplyr::arrange(., dplyr::pick(target_columns))
##   6. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##   7.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##   8.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##   9.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  10.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  11.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-find_and_remove_duplicates.R:87:3): find_duplicates sends a messages when duplicates are found
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─testthat::expect_message(...) at test-find_and_remove_duplicates.R:87:3
##   2. │ └─testthat:::expect_condition_matching(...)
##   3. │   └─testthat:::quasi_capture(...)
##   4. │     ├─testthat (local) .capture(...)
##   5. │     │ └─base::withCallingHandlers(...)
##   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
##   7. ├─cleanepi::find_duplicates(data = data, target_columns = "linelist_tags")
##   8. │ └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   9. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##  10. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##  11. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  12. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  13.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  14.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  15.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  16.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  17.         └─dplyr:::signal_warnings(warnings_state, error_call)
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## ⠏ |          0 | print_report                                                                                                                                                         ℹ No duplicates were found.
## ! Detected incorrect subject ids at lines: "3, 5, 7".
## ℹ You can use the `correct_subject_ids()` function to correct them.
## i Generating html report in '/tmp/RtmpDkZJkD'.
## Could not determine mime type for `/home/bahadzie/R/aarch64-unknown-linux-gnu-library/4.1/reactR/www/react-tools/react-tools.umd.cjs'
## ⠋ | 1        0 | print_report                                                                                                                                                         ⠙ | 1        1 | print_report                                                                                                                                                         ✖ | 1        2 | print_report
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## Error (test-print_report.R:45:3): print_report works
## Error: pandoc document conversion failed with error 63
## Backtrace:
##     ▆
##  1. └─cleanepi::print_report(...) at test-print_report.R:45:3
##  2.   └─rmarkdown::render(...) at cleanepi/R/print_report.R:114:3
##  3.     └─rmarkdown (local) convert(output_file, run_citeproc)
##  4.       └─rmarkdown (local) convert_it(output)
##  5.         └─rmarkdown (local) convert_fun(...)
##  6.           └─rmarkdown:::stop2(...)
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## ⠏ |          0 | remove_constants                                                                                                                                                     ! Constant data was removed after 2 iterations.
## i Enter `attr(dat, "report")[["constant_data"]]` for more information, where "dat" represents the object used to store the output from `remove_constants()`.
## ✔ |         43 | remove_constants iterations.
## ⠏ |          0 | replace_missing_values                                                                                                                                               ✔ |         10 | replace_missing_valuesalue character.
## ⠏ |          0 | span                                                                                                                                                                 ✔ |         37 | span                                                                                                                                                                 
## ⠏ |          0 | standardize_date                                                                                                                                                     i Target columns will be standardized using the following format: "%d/%m/%Y".
## i Target columns will be standardized using the following format: "%d/%m/%Y".
## Need to specify one format if all target columns have the
## ✔ |         24 | standardize_date                                                                                                                                                     
## ⠏ |          0 | standardize_subject_ids                                                                                                                                              ! Detected incorrect subject ids at lines: "3, 5, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## ⠴ |   2      4 | standardize_subject_ids                                                                                                                                              Assertion on',data,'failed: input data frame must be
##                  provided.Assertion on',id_column_name,'failed: Missing value not
##                  allowed for 'id_column_name'.Assertion on',id_column_name,'failed: Must be a character of
##                  length 1.Assertion on',nchar,'failed: template sample IDs format
##                  must be provided.Found 2 duplicated rows in the subject IDs.! Detected incorrect subject ids at lines: "3, 5, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## ⠸ |   4     10 | standardize_subject_ids                                                                                                                                              ! Detected incorrect subject ids at lines: "3, 5, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## ⠏ |   6     14 | standardize_subject_ids                                                                                                                                              ! Detected incorrect subject ids at lines: "3".
## i You can use the `correct_subject_ids()` function to correct them.
## ! Detected incorrect subject ids at lines: "3, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## ⠇ |   8     21 | standardize_subject_ids                                                                                                                                              ! Detected incorrect subject ids at lines: "3, 5, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## ! Detected incorrect subject ids at lines: "3, 5, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## ⠴ |   10     26 | standardize_subject_ids                                                                                                                                             All subject ids in the correction table should be part of the
##                  subject ids column of the input data.Column in 'correction_table' must be named as 'from' and
##                  'to'Missing values found in study_id column at in lines: 7! Detected incorrect subject ids at lines: "3, 5, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## ⠏ |   12     38 | standardize_subject_ids                                                                                                                                             ! Detected incorrect subject ids at lines: "3, 5, 7".
## i You can use the `correct_subject_ids()` function to correct them.
## ✔ |   12     45 | standardize_subject_ids
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## Warning (test-standardize_subject_ids.R:5:13): check_subject_ids works as expected when all parameters are
##           provided
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::check_subject_ids(...) at test-standardize_subject_ids.R:5:13
##   2. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   3. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##   4. │   │ └─base::withCallingHandlers(...)
##   5. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##   6. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   7. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   8. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   9. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  10. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  11.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  12.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  13.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  14.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  15.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:21:3): check_subject_ids fails as expected
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─testthat::expect_message(...) at test-standardize_subject_ids.R:21:3
##   2. │ └─testthat:::expect_condition_matching(...)
##   3. │   └─testthat:::quasi_capture(...)
##   4. │     ├─testthat (local) .capture(...)
##   5. │     │ └─base::withCallingHandlers(...)
##   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
##   7. ├─cleanepi::check_subject_ids(...)
##   8. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   9. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##  10. │   │ └─base::withCallingHandlers(...)
##  11. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##  12. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##  13. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##  14. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##  15. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  16. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  17.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  18.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  19.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  20.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  21.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:94:3): check_subject_ids sends a message when duplicated IDs are found
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─testthat::expect_message(...) at test-standardize_subject_ids.R:94:3
##   2. │ └─testthat:::expect_condition_matching(...)
##   3. │   └─testthat:::quasi_capture(...)
##   4. │     ├─testthat (local) .capture(...)
##   5. │     │ └─base::withCallingHandlers(...)
##   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
##   7. ├─cleanepi::check_subject_ids(...)
##   8. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   9. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##  10. │   │ └─base::withCallingHandlers(...)
##  11. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##  12. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##  13. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##  14. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##  15. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  16. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  17.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  18.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  19.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  20.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  21.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:106:3): check_subject_ids sends a message when duplicated IDs are found
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─testthat::expect_message(...) at test-standardize_subject_ids.R:106:3
##   2. │ └─testthat:::expect_condition_matching(...)
##   3. │   └─testthat:::quasi_capture(...)
##   4. │     ├─testthat (local) .capture(...)
##   5. │     │ └─base::withCallingHandlers(...)
##   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
##   7. ├─cleanepi::check_subject_ids(...)
##   8. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   9. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##  10. │   │ └─base::withCallingHandlers(...)
##  11. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##  12. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##  13. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##  14. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##  15. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  16. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  17.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  18.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  19.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  20.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  21.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:122:3): check_subject_ids when the id column is numeric
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::check_subject_ids(data = data, target_columns = "case_id") at test-standardize_subject_ids.R:122:3
##   2. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   3. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##   4. │   │ └─base::withCallingHandlers(...)
##   5. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##   6. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   7. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   8. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   9. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  10. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  11.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  12.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  13.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  14.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  15.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:131:3): check_subject_ids works when relying on the nchar argument
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::check_subject_ids(...) at test-standardize_subject_ids.R:131:3
##   2. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   3. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##   4. │   │ └─base::withCallingHandlers(...)
##   5. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##   6. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   7. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   8. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   9. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  10. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  11.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  12.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  13.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  14.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  15.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:143:3): check_subject_ids works when relying on the nchar argument
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::check_subject_ids(...) at test-standardize_subject_ids.R:143:3
##   2. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   3. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##   4. │   │ └─base::withCallingHandlers(...)
##   5. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##   6. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   7. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   8. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   9. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  10. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  11.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  12.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  13.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  14.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  15.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:156:3): check_subject_ids works when relying on the nchar argument
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::check_subject_ids(...) at test-standardize_subject_ids.R:156:3
##   2. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   3. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##   4. │   │ └─base::withCallingHandlers(...)
##   5. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##   6. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   7. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   8. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   9. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  10. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  11.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  12.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  13.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  14.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  15.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:176:3): correct_subject_ids works as expected
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::check_subject_ids(...) at test-standardize_subject_ids.R:176:3
##   2. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   3. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##   4. │   │ └─base::withCallingHandlers(...)
##   5. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##   6. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   7. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   8. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   9. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  10. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  11.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  12.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  13.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  14.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  15.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:193:3): correct_subject_ids works as expected
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::correct_subject_ids(...) at test-standardize_subject_ids.R:193:3
##   2. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:166:3
##   3. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##   4. │   │ └─base::withCallingHandlers(...)
##   5. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##   6. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   7. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   8. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   9. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  10. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  11.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  12.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  13.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  14.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  15.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:241:3): check_subject_ids fails as expected
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─testthat::expect_message(...) at test-standardize_subject_ids.R:241:3
##   2. │ └─testthat:::expect_condition_matching(...)
##   3. │   └─testthat:::quasi_capture(...)
##   4. │     ├─testthat (local) .capture(...)
##   5. │     │ └─base::withCallingHandlers(...)
##   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
##   7. ├─cleanepi::check_subject_ids(...)
##   8. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   9. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##  10. │   │ └─base::withCallingHandlers(...)
##  11. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##  12. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##  13. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##  14. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##  15. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  16. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  17.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  18.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  19.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  20.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  21.         └─dplyr:::signal_warnings(warnings_state, error_call)
## 
## Warning (test-standardize_subject_ids.R:257:3): check_subject_ids works when relying on the nchar argument
## There was 1 warning in `dplyr::arrange()`.
## i In argument: `..1 = dplyr::pick(target_columns)`.
## Caused by warning:
## ! Using an external vector in selections was deprecated in tidyselect 1.1.0.
## i Please use `all_of()` or `any_of()` instead.
##   # Was:
##   data %>% select(target_columns)
## 
##   # Now:
##   data %>% select(all_of(target_columns))
## 
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## Backtrace:
##      ▆
##   1. ├─cleanepi::check_subject_ids(...) at test-standardize_subject_ids.R:257:3
##   2. │ └─cleanepi:::check_subject_ids_oness(data, target_columns) at cleanepi/R/standardize_subject_ids.R:55:3
##   3. │   ├─base::suppressMessages(find_duplicates(data, id_col_name)) at cleanepi/R/standardize_subject_ids.R:195:3
##   4. │   │ └─base::withCallingHandlers(...)
##   5. │   └─cleanepi::find_duplicates(data, id_col_name) at cleanepi/R/standardize_subject_ids.R:195:3
##   6. │     └─... %>% ... at cleanepi/R/find_and_remove_duplicates.R:105:3
##   7. ├─dplyr::mutate(., group_id = dplyr::cur_group_id(), .after = "row_id")
##   8. ├─dplyr::group_by(., dplyr::across(dplyr::all_of(target_columns)))
##   9. ├─dplyr::arrange(., dplyr::pick(target_columns))
##  10. └─dplyr:::arrange.data.frame(., dplyr::pick(target_columns))
##  11.   └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
##  12.     ├─dplyr::mutate(data, `:=`("{name}", !!dot), .keep = "none")
##  13.     └─dplyr:::mutate.data.frame(data, `:=`("{name}", !!dot), .keep = "none")
##  14.       └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
##  15.         └─dplyr:::signal_warnings(warnings_state, error_call)
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## ⠏ |          0 | utils                                                                                                                                                                Assertion on',target_columns,'failed: all specified target
##                  columns will be ignored because they are either empty or
##                  constant.Assertion on',keep,'failed: usage of 'linelist_tags'
## ⠼ |         15 | utils                                                                                                                                                                ✔ |         32 | utilsnames indices are out of bound.
## 
## ══ Results ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
## Duration: 14.2 s
## 
## ── Failed tests ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## Error (test-print_report.R:45:3): print_report works
## Error: pandoc document conversion failed with error 63
## Backtrace:
##     ▆
##  1. └─cleanepi::print_report(...) at test-print_report.R:45:3
##  2.   └─rmarkdown::render(...) at cleanepi/R/print_report.R:114:3
##  3.     └─rmarkdown (local) convert(output_file, run_citeproc)
##  4.       └─rmarkdown (local) convert_it(output)
##  5.         └─rmarkdown (local) convert_fun(...)
##  6.           └─rmarkdown:::stop2(...)
## 
## [ FAIL 1 | WARN 25 | SKIP 0 | PASS 347 ]

@@ -1,9 +1,11 @@
#' Check date time frame
#'
#' @param first_date A Date object specifying the first valid date.
#' The arbitrary default value is fifty years before the `last_date`.
#' The arbitrary default value is fifty years before the \code{last_date}.
#' This can also be a character in ISO8601 format i.e. "2024-12-31".
#' @param last_date A Date object specifying the last valid date.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other datatype can it be? Here you are indicating that it can also be character without saying what it usually is.

Copy link
Member Author

@Karim-Mane Karim-Mane Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have mentioned on line 3 that it's supposed to be a <Date> object, the second option being <character>.
Do you think this needs to be updated with more details?

@Karim-Mane
Copy link
Member Author

devtools::test()

Thanks @bahadzie for the review
I can't reproduce this error on my environment both locally and remotely. Let's discuss this tomorrow.

Copy link

This pull request:

  • Adds 2 new dependencies (direct and indirect)
  • Adds 2 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

(Note that results may be inacurrate if you branched from an outdated version of the target branch.)

Copy link

This pull request:

  • Adds 2 new dependencies (direct and indirect)
  • Adds 2 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

(Note that results may be inacurrate if you branched from an outdated version of the target branch.)

Copy link

This pull request:

  • Adds 2 new dependencies (direct and indirect)
  • Adds 2 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

(Note that results may be inacurrate if you branched from an outdated version of the target branch.)

Copy link

This pull request:

  • Adds 2 new dependencies (direct and indirect)
  • Adds 2 new system dependencies
  • Removes 0 existing dependencies (direct and indirect)
  • Removes 0 existing system dependencies

(Note that results may be inacurrate if you branched from an outdated version of the target branch.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: In Progress
3 participants