-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
datefixR: Fix Really Messy Dates #533
Comments
Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type |
🚀 Editor check started 👋 |
Checks for datefixR (v0.1.4.9000)git hash: 5513135a
Package License: GPL (>= 3) 1. Package DependenciesDetails of Package Dependency Usage (click to open)
The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.
Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table. basedate (3), for (3), paste0 (2), c (1), new.env (1), nrow (1) datefixRfix_date (2) statsdf (1) stringrstr_split_fixed (1) 2. Statistical PropertiesThis package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing. Details of statistical properties (click to open)
The package has:
Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the The final measure (
2a. Network visualisationClick to see the interactive network visualisation of calls between objects in package 3.
|
name | conclusion | sha | date |
---|---|---|---|
pages build and deployment | success | b11eed | 2022-04-29 |
pkgdown | success | 551313 | 2022-04-29 |
R-CMD-check | success | 551313 | 2022-04-29 |
3b. goodpractice
results
R CMD check
with rcmdcheck
rcmdcheck found no errors, warnings, or notes
Test coverage with covr
Package coverage: 100
Cyclocomplexity with cyclocomp
The following function have cyclocomplexity >= 15:
function | cyclocomplexity |
---|---|
fix_date | 35 |
Static code analyses with lintr
lintr found the following 4 potential issues:
message | number of times |
---|---|
Avoid 1:nrow(...) expressions, use seq_len. | 1 |
Lines should not be more than 80 characters. | 3 |
Package Versions
package | version |
---|---|
pkgstats | 0.0.4.30 |
pkgcheck | 0.0.3.11 |
Editor-in-Chief Instructions:
This package is in top shape and may be passed on to a handling editor
@ropensci-review-bot assign @adamhsparks as editor |
Assigned! @adamhsparks is now the editor |
Hi @nathansam, could you address the issues lintr found, While you're doing that I'll start looking for reviewers. |
@ropensci-review-bot seeking reviewers |
Please add this badge to the README of your package repository: [![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/533_status.svg)](https://github.com/ropensci/software-review/issues/533) Furthermore, if your package does not have a NEWS.md file yet, please create one to capture the changes made during the review process. See https://devguide.ropensci.org/releasing.html#news |
Hi @adamhsparks, thank you! Those lintr issues should now be fixed. |
Hi @nathansam, as I've been looking for reviewers and checking over the package some more, I did note some issues with the spelling and tests as well. When I check the tests, I get this: Backtrace:
1. testthat::expect_equal(...)
at test_fix_dates.R:206:2
4. datefixR::fix_dates(temp, "date", day.impute = NA)
9. datefixR::.fix_date(...)
at datefixR/R/fix_dates.R:81:10
── Warning (test_fix_dates.R:215:3): Imputing month with NA results in NA ──────
NA imputed for subject 1 (date: 1994)
Backtrace:
1. testthat::expect_equal(...)
at test_fix_dates.R:215:2
4. datefixR::fix_dates(temp, "date", month.impute = NA)
9. datefixR::.fix_date(...)
at datefixR/R/fix_dates.R:81:10 With the spelling, your DESCRIPTION says "en-US" but you've used British English for "behaviour", also the spellcheck is picking up a few other words that are non-standard but probably correct anyway. I suggest setting up spell checking with |
Thanks @adamhsparks ! I have fixed the typo and have now set up |
@ropensci-review-bot add @AlvesKS to reviewers |
@AlvesKS added to the reviewers list. Review due date is 2022-05-30. Thanks @AlvesKS for accepting to review! Please refer to our reviewer guide. |
@ropensci-review-bot add @arhepworth to reviewers |
@arhepworth added to the reviewers list. Review due date is 2022-05-31. Thanks @arhepworth for accepting to review! Please refer to our reviewer guide. |
@arhepworth: If you haven't done so, please fill this form for us to update our reviewers records. |
Hi @alstat, please don't forget to complete our review template along with the issues that you've opened for datefixR when you're finished with your review. 🙏 |
Noted @adamhsparks, still reviewing, hoping to complete it within the week. Thanks. |
Package ReviewPlease check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
DocumentationThe package includes all the following forms of documentation:
Functionality
Estimated hours spent reviewing: 8hrs
Issues opened
Review CommentsThe package provides a straightforward formatting of the dates, and its simplicity makes it a very good alternative to |
Thank you both for your reviews, they are gratefully received! I believe I have implemented all of your feedback in the @AlvesKSREADME
Thank you, I have rewritten the purpose of the package which I believe is now clearer. Function naming
I agree and have changed the function names to https://github.com/nathansam/datefixR/blob/6d686729aea7e12dcaf9c66c536137d936fbef0e/R/fix_date_df.R#L41-L46 As this package is already on CRAN and appears to have some degree of a user base, I have deprecated Interaction with dplyr::mutate()
Thank you for the suggestion. This behaviour was due to fix_dates() documentation
Thank you, the term "tidies" is now used instead. ### Vignette
Thank you. There is now an example dataset, exampledates, provided by the package which includes examples of dates in different formats some of which have missing date data to demonstrate the imputation feature. In the vignette, I still create a data frame, as I want to introduce the data standardisation feature before the imputation feature rather than introducing both at the same time. However, I have now made the data frame creation visible in the vignette by setting @alstatI note you have closed the issues you created (thanks for creating them!), so I assume you are satisfied with my additions. Nevertheless, I will include here for the sake of keeping everything together. Docs: add format output in the value returned by fix_date ropensci/datefixR#17Thank you! Date Format is now given in the documentation. Docs: add datetime input as limitation ropensci/datefixR#18Thank you! Not supporting datetime formats has now been included as a limitation in the readme file. |
📆 @alstat you have 2 days left before the due date for your review (2022-07-15). |
@ropensci-review-bot submit review #533 (comment) time 9 |
Logged review for AlvesKS (hours: 9) |
@ropensci-review-bot submit review #533 (comment) |
I'm sorry human, I don't understand that. You can see what commands I support by typing:
|
@adamhsparks I've completed the checklist. |
@ropensci-review-bot submit review #533 (comment) time 8 |
Logged review for alstat (hours: 8) |
I'm satisfied with the changes here, both issues I opened were addressed. |
Hi @adamhsparks, I am also satisfied with the changes. Kaique |
@ropensci-review-bot approve datefixR |
Approved! Thanks @nathansam for submitting and @AlvesKS, @alstat for your reviews! 😁 To-dos:
Should you want to acknowledge your reviewers in your package DESCRIPTION, you can do so by making them Welcome aboard! We'd love to host a post about your package - either a short introduction to it with an example for a technical audience or a longer post with some narrative about its development or something you learned, and an example of its use for a broader readership. If you are interested, consult the blog guide, and tag @ropensci/blog-editors in your reply. They will get in touch about timing and can answer any questions. We maintain an online book with our best practice and tips, this chapter starts the 3d section that's about guidance for after onboarding (with advice on releases, package marketing, GitHub grooming); the guide also feature CRAN gotchas. Please tell us what could be improved. Last but not least, you can volunteer as a reviewer via filling a short form. |
Thank you, @AlvesKS and @alstat for your kind and insightful reviews. I hope you found this experience useful and enjoyable. @nathansam, thank you for submitting datefixR. You can transfer it to rOpenSci now. |
Thank you @AlvesKS and @alstat, your reviews were immeasurably helpful! I am of course more than happy to acknowledge you both as reviewers in DESCRIPTION. I have added your details based on the DESCRIPTION files for your own packages. Please let me know if you would like any edits made to your listings in the description. Thank you @adamhsparks for your editorship throughout and for the issues you have opened. I will begin the process of migrating datefixR to the ropensci organization now. |
@ropensci-review-bot finalize transfer of datefixR |
Transfer completed. |
Date accepted: 2022-07-16
Due date for @AlvesKS: 2022-05-30Submitting Author Name: Nathan Constantine-Cooke
Submitting Author Github Handle: @nathansam
Other Package Authors Github handles: (comma separated, delete if none)
Repository: https://github.com/nathansam/datefixR
Version submitted: 0.1.4.9000
Submission type: Standard
Editor: @adamhsparks
Reviewers: @AlvesKS, @alstat
Due date for @alstat: 2022-07-15
Archive: TBD
Version accepted: TBD
Language: en
Scope
Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
datefixR takes date data in which has been stored in many different formats (01/01/2001, 5 April 2020, Dec 2015 etc.) and converts them to R's
Date
type.Any researchers using data entered via a questionnaire which (unfortunately) asked for a date as free-text. Given the nature of this data generation, this mainly affects those who work with human subjects.
lubridate::guess_formats()
can be used to guess a date format andlubridate::parse_date_time()
calls this function when it attempts to parse a vector into a POSIXct date-time object. However:{lubridate}
then the user is simply told how many dates failed to parse. IndatefixR
the user is told the ID (assumed to be the first column by default but can be user-specified) corresponding to the date which failed to parse and reports the considered date: making it much easier to figure out which dates supplied failed to parse and why.{lubridate}
. IndatefixR
, this behaviour can be controlled by themonth.impute
argument.orders
argument, which may result in a date format not being considered if the user forgets to list one of the possible formats. By contrast,datefixR
only needs a format to be specified if month-first is to be preferred over day-first when guessing a date.However,
{lubridate}
of course excels in general date manipulation and is an excellent tool to use alongsidedatefixR
.An alternative function is
anytime::anydate()
which also attempts to convert dates to a consistent format (POSIXct). However{anytime}
assumes year, month, and day have all been provided and does not permit imputation. Moreover, if a date cannot be parsed, then the date is converted to an NA object and no warning is raised- which may lead to issues later in the analysis.NA
#529
pkgcheck
items which your package is unable to pass.pkgcheck claims: "Package has no continuous integration checks." however Github actions is already used so this is a false positive.
Technical checks
Confirm each of the following by checking the box.
This package:
Publication options
(Already available on CRAN)
NA
MEE Options
Code of conduct
The text was updated successfully, but these errors were encountered: