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 #234 Add new ADRS vignette #240

Merged

Conversation

bundfussr
Copy link
Collaborator

@bundfussr bundfussr commented Jul 27, 2023

Please add "Closes #" to the title of the pull request. Then the
issue is closed automatically once it is merged to main.

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 devel branch until you have checked off each task.

  • 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 - See Unit Test Guide
  • If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
  • Update to all relevant roxygen headers and examples
  • 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
  • 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 so that it closes after successful merging.
  • Address all merge conflicts and resolve appropriately
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

The following line requests to update the man pages by the "Man Pages" workflow.

/roxygenize

@github-actions
Copy link

github-actions bot commented Jul 27, 2023

Code Coverage

Package Line Rate Health
admiralonco 97%
Summary 97% (542 / 558)

@bundfussr bundfussr marked this pull request as ready for review August 18, 2023 15:40
@bundfussr bundfussr changed the title Closes #234 deprecate admiralonco functions Closes #234 Add new ADRS vignette Aug 23, 2023
Copy link
Contributor

@rossfarrugia rossfarrugia left a comment

Choose a reason for hiding this comment

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

@bundfussr leaving first batch of review comments. i need to run pkgdown next as easier to review the vignettes that way, so may have some more to add.

@amitjaingsk i'm focusing my review mostly on the documentation so trust you and the other team members are reviewing the code here and comparing the new alternative ADRS code against the basic version we have to ensure consistent results over some different data.

NEWS.md Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
R/event_sources.R Outdated Show resolved Hide resolved
inst/templates/ad_adrs.R Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
inst/templates/ad_adrs_basic.R Show resolved Hide resolved
inst/templates/ad_adrs_basic.R Outdated Show resolved Hide resolved
Copy link
Contributor

@rossfarrugia rossfarrugia left a comment

Choose a reason for hiding this comment

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

few more comments for consideration - and still working through reviewing the new vignette

NEWS.md Outdated Show resolved Hide resolved
vignettes/adrs_basic.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Show resolved Hide resolved
vignettes/adrs.Rmd Show resolved Hide resolved
vignettes/adrs_basic.Rmd Outdated Show resolved Hide resolved
R/event_sources.R Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
Copy link
Contributor

@rossfarrugia rossfarrugia left a comment

Choose a reason for hiding this comment

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

final review comments from me for this PR

vignettes/adrs.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Show resolved Hide resolved
vignettes/adrs.Rmd Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Show resolved Hide resolved
@rossfarrugia
Copy link
Contributor

@bundfussr do you think users might get confused that we have event_sources.R that runs event() to create ADRS objects, and tte_sources.R that runs event_source() to create ADTTE objects. I just got myself in a tangle trying to understand the difference between event_sources and event_source, and then figured it out. I don't have any alternative naming solution to suggest either though 😕

@bundfussr
Copy link
Collaborator Author

I forgot to mention that the new admiral functionality is not merged to devel yet. If you want to render the new vignette, you need to call remotes::install_github("pharmaverse/admiral", ref = "1960_enhance_derive_extreme_event@devel") for installing admiral first.

@bundfussr
Copy link
Collaborator Author

@bundfussr do you think users might get confused that we have event_sources.R that runs event() to create ADRS objects, and tte_sources.R that runs event_source() to create ADTTE objects. I just got myself in a tangle trying to understand the difference between event_sources and event_source, and then figured it out. I don't have any alternative naming solution to suggest either though 😕

Good point! I have added it to the clean-up discussion.

@bundfussr bundfussr linked an issue Aug 30, 2023 that may be closed by this pull request
@bundfussr
Copy link
Collaborator Author

@amitjaingsk , I have updated the ADRS vignettes and templates such that they are using the new test data from pharmasdtm now.

Copy link
Collaborator

@amitjaingsk amitjaingsk left a comment

Choose a reason for hiding this comment

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

Hi Stefan,
I did some review but as not able to run and see the results and vignette. Not able to review thoroughly. But provided few comments please have a look.

#' R console, e.g. `bor_sd`. For details of how to use these objects
#' please refer to [admiral::derive_extreme_event()].
#'
#' It is assumed that `dataset_name = "ovr"` refers to the dataset of the
Copy link
Collaborator

Choose a reason for hiding this comment

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

here you mean we only include overall response record and not target or non-target responses at each visit? if right can we update:
It is assumed that dataset_name = "ovr" refers to the dataset of the only overall response assessments at each visit which should be considered for the parameter....
2. I assume we prefer to only consider post-baseline records in 'ovr' dataset.. if yes can you please add as its important. Now in SDTM RS domain, some companies also include prior anti-cancer therapy or screening responses.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated the text regarding both points.

dataset_name = "adsl",
condition = TRUE,
set_values_to = exprs(
AVALC = "MISSING"
Copy link
Collaborator

Choose a reason for hiding this comment

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

AVALC (and aval) should not be both missing.. I guess we can use 'NE' right. So, the intend is to create this in the end right? I understand it but can we update the description "Define missing response (MISSING) for all patients in adsl in your population who has no post baseline response (should be used", "as last event)"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated the text as suggested. You could use AVALC = "NE" instead of AVALC = "MISSING". I used AVALC = "MISSING" because that's used in the basic version and was used in the old vignette.

inst/templates/ad_adrs.R Show resolved Hide resolved
inst/templates/ad_adrs.R Show resolved Hide resolved
inst/templates/ad_adrs_basic.R Show resolved Hide resolved
@bundfussr
Copy link
Collaborator Author

@amitjaingsk , for a rendered version of the website please see https://bundfussr.github.io/admiral/234_deprecate/.

Copy link
Collaborator

@amitjaingsk amitjaingsk left a comment

Choose a reason for hiding this comment

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

Thanks for updating Stefan. I was able to run adrs_basic is its looks good, only one suggestion I made. for adrs, I was not able to run so not able to make sure the results are matching is adrs_basic , did you checked? Otherwise it looks good.

vignettes/adrs_basic.Rmd Outdated Show resolved Hide resolved
inst/templates/ad_adrs_basic.R Show resolved Hide resolved
@bundfussr
Copy link
Collaborator Author

make sure the results are matching is adrs_basic , did you checked?

I compared the results of the adrs and adrs_basic template. They match (except that adrs additionally creates ANL02FL but this is an expected difference).

Copy link
Contributor

@rossfarrugia rossfarrugia left a comment

Choose a reason for hiding this comment

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

@bundfussr few more comments from re-review

DESCRIPTION Show resolved Hide resolved
vignettes/adrs_basic.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
@rossfarrugia
Copy link
Contributor

@bundfussr do you think users might get confused that we have event_sources.R that runs event() to create ADRS objects, and tte_sources.R that runs event_source() to create ADTTE objects. I just got myself in a tangle trying to understand the difference between event_sources and event_source, and then figured it out. I don't have any alternative naming solution to suggest either though 😕

Good point! I have added it to the clean-up discussion.

Suggestion: i think the potentially easiest solution here is in admiralonco call it response_sources.R instead of event_sources.R

Copy link
Contributor

@rossfarrugia rossfarrugia left a comment

Choose a reason for hiding this comment

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

@bundfussr few more minor comments spotted and then happy to approve

inst/templates/ad_adrs.R Show resolved Hide resolved
inst/templates/ad_adrs.R Outdated Show resolved Hide resolved
R/response_sources.R Outdated Show resolved Hide resolved
vignettes/adrs.Rmd Outdated Show resolved Hide resolved
@bundfussr bundfussr merged commit 2a5817e into devel Sep 5, 2023
21 checks passed
@bundfussr bundfussr deleted the 234_deprecate@1960_enhance_derive_extreme_event@devel branch September 5, 2023 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants