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

Closes #2468 Implement derive_vars_crit_flag() #2469

Merged
merged 10 commits into from
Jul 9, 2024
Merged

Conversation

bundfussr
Copy link
Collaborator

@bundfussr bundfussr commented Jun 26, 2024

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the main branch until you have checked off each task.

  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
  • Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
  • If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
  • Review the Cheat Sheet. Make any required updates to it by editing the file inst/cheatsheet/admiral_cheatsheet.pptx and re-upload a PDF version of it to the same folder.
  • Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Address any updates needed for vignettes and/or templates
  • Update NEWS.md under the header # admiral (development version) if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers). A Developer Notes section is available in NEWS.md for tracking developer-facing issues.
  • Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
  • Address or fix all lintr warnings and errors - lintr::lint_package()
  • Run R CMD check locally and address all errors and warnings - devtools::check()
  • Link the issue in the Development Section on the right hand side.
  • Address all merge conflicts and resolve appropriately
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

@bundfussr bundfussr linked an issue Jun 26, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Jun 26, 2024

Code Coverage

Package Line Rate Health
admiral 96%
Summary 96% (4952 / 5151)

Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

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

Looks really good!! I will try and finish review by tomorrow. Just having a glance right now. @zdz2101 just FYI on your Hy's LAw Vignette :)

Copy link
Collaborator

@manciniedoardo manciniedoardo left a comment

Choose a reason for hiding this comment

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

LGTM - only comment is, can we showcase this new function in a vignette? What about here or right after?

@bms63
Copy link
Collaborator

bms63 commented Jul 1, 2024

Sorry I still want to review more thoroughly. Can we not merge until I complete please.

@bundfussr
Copy link
Collaborator Author

LGTM - only comment is, can we showcase this new function in a vignette? What about here or right after?

Yes, good idea. I'll add an example there.

@bms63
Copy link
Collaborator

bms63 commented Jul 3, 2024

What do you think about a MCRIT flag for multiple responses? Worth to make a related function?

@bms63
Copy link
Collaborator

bms63 commented Jul 3, 2024

Worth to give more reasoning to a user on why these flags might be useful?
image

@bms63
Copy link
Collaborator

bms63 commented Jul 3, 2024

oohhh could we have a similar example with the AND condition - this is from ADaM IG
image

Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

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

I think I just have some concerns around testing and the AND condition example. Everything else is looking super neat and awesome!

@bundfussr
Copy link
Collaborator Author

LGTM - only comment is, can we showcase this new function in a vignette? What about here or right after?

@manciniedoardo , I have added an example. It is also a nice use case of our higher order functions.

@bundfussr
Copy link
Collaborator Author

oohhh could we have a similar example with the AND condition - this is from ADaM IG image

@bms63 , I have added this example to the bds_finding vignette.

@bundfussr
Copy link
Collaborator Author

Worth to give more reasoning to a user on why these flags might be useful? image

@bms63 , I've added it to the description of the function.

@bms63 bms63 self-requested a review July 9, 2024 12:46
Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

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

The first function for 1.2!! Way to go @bundfussr

@manciniedoardo we should start a skeleton blog for 1.2 and add this in.

@bms63 bms63 dismissed manciniedoardo’s stale review July 9, 2024 12:47

Suggested implemented

@bms63 bms63 merged commit 4cd9cfd into main Jul 9, 2024
16 checks passed
@bms63 bms63 deleted the 2468_derive_vars_crit_flag branch July 9, 2024 12:47
@bundfussr bundfussr restored the 2468_derive_vars_crit_flag branch July 15, 2024 14:10
@bundfussr bundfussr deleted the 2468_derive_vars_crit_flag branch July 15, 2024 14:12
@bundfussr bundfussr restored the 2468_derive_vars_crit_flag branch July 15, 2024 15:23
@bundfussr
Copy link
Collaborator Author

What do you think about a MCRIT flag for multiple responses? Worth to make a related function?

I wouldn't implement an MCRIT specific function because there are almost no restrictions on the values of the MCRIT* variables. However, a function for creating variable pairs like MCRITyFL/MCRITyFN in one go would be useful. See #2480.

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

Successfully merging this pull request may close these issues.

Feature Request: Implement derive_vars_crit_flag()
3 participants