Skip to content

Commit 8c4efa9

Browse files
committed
fix cran submission issues
1 parent a28e97c commit 8c4efa9

9 files changed

+39
-110
lines changed

CRAN-SUBMISSION

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Version: 1.0.0
2-
Date: 2024-06-13 15:49:31 UTC
3-
SHA: 347316e702882365c29a470fb39578875a2b7dbb
1+
Version: 1.0.1
2+
Date: 2024-06-13 19:21:41 UTC
3+
SHA: a28e97c0cd96fb15e85b41e487485c089edebf95

DESCRIPTION

+14-10
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,36 @@ Authors@R: c(
55
person("Karim", "Mané", , "[email protected]", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0002-9892-2999")),
77
person("Thibaut", "Jombart", , "[email protected]", role = "cph",
8-
comment = c("Thibault is the owner of the code in guess_dates.R file.")),
8+
comment = "Thibault is the owner of the code in guess_dates.R file."),
99
person("Bubacarr", "Bah", , "[email protected]", role = "aut",
1010
comment = c(ORCID = "0000-0003-3318-6668")),
1111
person("Bankolé", "Ahadzie", , "[email protected]", role = "aut"),
1212
person("Nuredin", "Mohammed", , "[email protected]", role = "aut"),
13-
person("Abdoelnaser", "Degoot", , "[email protected]", role = "aut",
14-
comment = c(ORCID = "0000-0001-8788-2496")),
15-
person("Hugo", "Gruson", , "[email protected]", role = "rev",
16-
comment = c(ORCID = "0000-0002-4094-1476")),
17-
person("Pratik R.", "Gupte", , "[email protected]", role ="rev",
13+
person("Abdoelnaser", "Degoot", , "[email protected]", role = "aut",
14+
comment = c(ORCID = "0000-0001-8788-2496")),
15+
person("Hugo", "Gruson", , "[email protected]", role = "rev",
16+
comment = c(ORCID = "0000-0002-4094-1476")),
17+
person("Pratik R.", "Gupte", , "[email protected]", role = "rev",
1818
comment = c(ORCID = "0000-0001-5294-7819")),
1919
person("James M.", "Azam", , "[email protected]", role = "rev",
20-
comment = c(ORCID = "0000-0001-5782-7330")),
20+
comment = c(ORCID = "0000-0001-5782-7330")),
2121
person("Joshua W.", "Lambert", , "[email protected]", role = "rev",
2222
comment = c(ORCID = "0000-0001-5218-3046")),
2323
person("Chris", "Hartgerink", , "[email protected]", role = "rev",
2424
comment = c(ORCID = "0000-0003-1050-6809")),
2525
person("London School of Hygiene and Tropical Medicine, LSHTM", role = "cph"),
2626
person("data.org", role = "fnd")
2727
)
28-
Description: cleanepi provides functions for cleaning and standardizing tabular data,
29-
tailored specifically for curating epidemiological data.
28+
Description: Cleaning and standardizing tabular data package, tailored
29+
specifically for curating epidemiological data. It streamlines various data
30+
cleaning tasks that are typically expected when working with datasets in
31+
epidemiology. It returns the processed data in the same format, ensuring
32+
seamless integration into existing workflows. Additionally, it generates a
33+
comprehensive report detailing the outcomes of each cleaning task.
3034
License: MIT + file LICENSE
3135
URL: https://epiverse-trace.github.io/cleanepi/,
3236
https://github.com/epiverse-trace/cleanepi
3337
BugReports: https://github.com/epiverse-trace/cleanepi/issues
34-
Language: en-US
3538
Imports:
3639
arsenal,
3740
checkmate,
@@ -62,6 +65,7 @@ VignetteBuilder:
6265
Config/Needs/website: epiverse-trace/epiversetheme
6366
Config/testthat/edition: 3
6467
Encoding: UTF-8
68+
Language: en-US
6569
LazyData: true
6670
Roxygen: list(markdown = TRUE)
6771
RoxygenNote: 7.3.1

R/clean_data.R

+9-9
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ clean_data <- function(data, params = NULL) {
124124
## | Column names in 'keep' will not be modified.
125125
## -----
126126
if (!is.null(params[["standardize_column_names"]])) {
127-
base::cat("\ncleaning column names\n")
127+
message("\ncleaning column names\n")
128128
data <- standardize_column_names(
129129
data = data,
130130
keep = params[["standardize_column_names"]][["keep"]],
@@ -139,7 +139,7 @@ clean_data <- function(data, params = NULL) {
139139
## | user if known, or inferred internally otherwise.
140140
## -----
141141
if (!is.null(params[["replace_missing_values"]])) {
142-
base::cat("replacing missing values with NA\n")
142+
message("replacing missing values with NA\n")
143143
data <- replace_missing_values(
144144
data = data,
145145
target_columns = params[["replace_missing_values"]][["target_columns"]],
@@ -151,7 +151,7 @@ clean_data <- function(data, params = NULL) {
151151
## | we can choose to remove the constant columns, the empty rows and columns
152152
## -----
153153
if (!is.null(params[["remove_constants"]])) {
154-
base::cat("removing the constant columns, empty rows and columns\n")
154+
message("removing the constant columns, empty rows and columns\n")
155155
data <- remove_constants(
156156
data = data,
157157
cutoff = params[["remove_constants"]][["cutoff"]]
@@ -166,7 +166,7 @@ clean_data <- function(data, params = NULL) {
166166
## | duplicates will only be considered from the specified columns.
167167
## -----
168168
if (!is.null(params[["remove_duplicates"]])) {
169-
base::cat("removing duplicated rows\n")
169+
message("removing duplicated rows\n")
170170
data <- remove_duplicates(
171171
data,
172172
target_columns = params[["remove_duplicates"]][["target_columns"]]
@@ -179,7 +179,7 @@ clean_data <- function(data, params = NULL) {
179179
## | easy to apply the functions that operate on variables of type Date.
180180
## -----
181181
if (!is.null(params[["standardize_dates"]])) {
182-
base::cat("standardising date columns\n")
182+
message("standardising date columns\n")
183183
data <- standardize_dates(
184184
data = data,
185185
target_columns = params[["standardize_dates"]][["target_columns"]],
@@ -199,7 +199,7 @@ clean_data <- function(data, params = NULL) {
199199
## | redundant subject ID.
200200
## -----
201201
if (!is.null(params[["standardize_subject_ids"]])) {
202-
base::cat("checking subject IDs format\n")
202+
message("checking subject IDs format\n")
203203
stopifnot(
204204
"'target_columns' must be provided." =
205205
!is.null(params[["standardize_subject_ids"]][["target_columns"]])
@@ -220,7 +220,7 @@ clean_data <- function(data, params = NULL) {
220220
## | homogeneous.
221221
## -----
222222
if (!is.null(params[["to_numeric"]])) {
223-
base::cat(
223+
message(
224224
"converting",
225225
paste(params[["to_numeric"]], sep = ", "),
226226
"into numeric\n"
@@ -238,7 +238,7 @@ clean_data <- function(data, params = NULL) {
238238
## replace these coded values with the exact values from the data dictionary.
239239
## -----
240240
if (!is.null(params[["dictionary"]])) {
241-
base::cat("performing dictionary-based cleaning\n")
241+
message("performing dictionary-based cleaning\n")
242242
data <- clean_using_dictionary(data, params[["dictionary"]])
243243
}
244244

@@ -248,7 +248,7 @@ clean_data <- function(data, params = NULL) {
248248
## will be flagged out.
249249
## -----
250250
if (!is.null(params[["check_date_sequence"]])) {
251-
base::cat("checking whether date the sequences are respected\n")
251+
message("checking whether date the sequences are respected\n")
252252
data <- check_date_sequence(
253253
data = data,
254254
target_columns = params[["check_date_sequence"]][["target_columns"]]

R/guess_dates.R

-42
Original file line numberDiff line numberDiff line change
@@ -24,48 +24,6 @@
2424
#' than one format. If all values comply with only one format, the later
2525
#' element will be NULL.
2626
#'
27-
#' @examples
28-
#' \dontrun{
29-
#' # Mixed format date -----------------------------------------
30-
#'
31-
#' guess_dates(c("03 Jan 2018", "07/03/1982", "08/20/85")) # default
32-
#'
33-
#' # Prioritizing specific date formats ------------------------
34-
#' #
35-
#' # The default orders prioritize world date ordering over American-style.
36-
#' orders <- list(
37-
#' world_named_months = c("Ybd", "dby"),
38-
#' world_digit_months = c("dmy", "Ymd"),
39-
#' US_formats = c("Omdy", "YOmd")
40-
#' )
41-
#'
42-
#' # if you want to prioritize American-style dates with numeric months, you
43-
#' # can switch the second and third elements of the default orders
44-
#'
45-
#' print(us_ord <- orders[c(1, 3, 2)])
46-
#' date_guess(c("03 Jan 2018", "07/03/1982", "08/20/85"), orders = us_ord)
47-
#'
48-
#' # Handling dates with time formats --------------------------
49-
#' #
50-
#' # If you have a format with hours, minutes and seconds, you can also add that
51-
#' # to the list of formats. Note, however, that this function will drop levels
52-
#' # below day.
53-
#'
54-
#' print(orders$ymdhms <- c("Ymdhms", "Ymdhm"))
55-
#'
56-
#' date_guess(c("2014_04_05_23:15:43", "03 Jan 2018",
57-
#' "07/03/1982", "08/20/85"), orders = orders)
58-
#'
59-
#' # Handling missing and nonsense data -----------------------
60-
#' #
61-
#' # date_guess can handle messy dates and tolerate missing data
62-
#'
63-
#' x <- c("01-12-2001", "male", "female", "2018-10-18", NA, NA, "2018_10_17",
64-
#' "43391", "2018 10 19", "// 24/12/1989", "this is 24/12/1989!",
65-
#' "RECON NGO: 19 Sep 2018 :)", "6/9/11", "10/10/10")
66-
#'
67-
#' date_guess(x)
68-
#' }
6927
#' @keywords internal
7028
#'
7129
date_guess <- function(x,

R/print_report.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#'
1414
#' @returns A string containing the name and path of the saved report
1515
#' @examples
16-
#' \dontrun{
16+
#' \donttest{
1717
#' data <- readRDS(system.file("extdata", "test_df.RDS", package = "cleanepi"))
1818
#' test_dictionary <- readRDS(system.file("extdata", "test_dictionary.RDS",
1919
#' package = "cleanepi"))

cran-comments.md

+10
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@
77
## revdepcheck results
88

99
* There are currently no downstream dependencies for this package.
10+
11+
## Resubmission
12+
13+
This is a resubmission. In this version I have fixed the NOTE raised during the
14+
previous submission. The changes include:
15+
16+
* Updating inst/WORDLIST with the new words that were missing.
17+
* Adding a '/' to the package Github link in the DESCRIPTION file.
18+
* Removing "Type: Package" from the DESCRIPTION file.
19+
* Update package description from the DESCRIPTION file.

man/cleanepi-package.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/date_guess.Rd

-43
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/print_report.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)