Closes #73: add ADVS example and update ADSL example and corresponding specs#83
Closes #73: add ADVS example and update ADSL example and corresponding specs#83rossfarrugia merged 35 commits intomainfrom
Conversation
…se build_from_derived() function
bms63
left a comment
There was a problem hiding this comment.
I am so excited about this @Fanny-Gautier !!!! I will try to get to early next week.
@pharmaverse/admiral we got some new integrated examples coming online as a result of @Fanny-Gautier hard work. Anyone got time to help out with the review?
This aligns ADSL closer to admiral ADSL and introduces ADVS as another example
adam/adsl.qmd
Outdated
| where_sep_sheet = FALSE, | ||
| quiet = TRUE |
There was a problem hiding this comment.
Could we mention why we are setting these arguments like this?
There was a problem hiding this comment.
where_sep_sheet explained
quiet dropped and thus left to the default value since we do not have any warnings to mute
| predecessor_only = FALSE, keep = TRUE) | ||
| ds_list = list("dm" = dm_suppdm, "suppdm" = dm_suppdm), | ||
| predecessor_only = FALSE, keep = FALSE) | ||
| head(adsl_preds, n=10) |
There was a problem hiding this comment.
could we display this in a prettier way using reactable package? https://github.com/pharmaverse/admiraldiscovery/blob/v0.3.0/R/interactive.R here is what Daniel uses it in admiraldiscovery
There was a problem hiding this comment.
we could just create another folder called functions at the top-level. and store the fancy code in there. and then your code could call the reactable code from the functions folder
There was a problem hiding this comment.
but yeah agree the vanilla reactable looks sad
There was a problem hiding this comment.
This will be implemented later, once #84 is completed.
adam/adsl.qmd
Outdated
| Now we have the base dataset, we can start to create some variables. | ||
| There are a few options to create grouping variables and their corresponding numeric variables. | ||
|
|
||
| Option 1: We can start with creating the subgroups using the controlled terminology, in this case `AGEGR1`. |
There was a problem hiding this comment.
At least "Option 1" should be bold.
There was a problem hiding this comment.
@bms63 Could you let me know what you expect here using logr / logrx ? Thanks
There was a problem hiding this comment.
metatools option | admiral option
maybe??
There was a problem hiding this comment.
As agreed with @bms63 today, it will be done later since I am lost with this request.
| Now we have sorted out what we can easily do with controlled terminology it is time to start deriving some variables. Here you could refer directly to using the `{admiral}` template and [vignette](https://pharmaverse.github.io/admiral/cran-release/articles/adsl.html) in practice, but for the purpose of this end-to-end ADaM vignette we will share a few exposure derivations from there. We derive the start and end of treatment (which requires dates to first be converted from DTC to DTM), the treatment duration, and the safety population flag. | ||
| ### Exposure derivations | ||
|
|
||
| Now we have sorted out what we can easily do with controlled terminology it is time to start deriving some variables. |
adam/adsl.qmd
Outdated
| condition = (EXDOSE > 0 | (EXDOSE == 0 & str_detect(EXTRT, "PLACEBO"))) | ||
| ) %>% | ||
| drop_unspec_vars(metacore) # This will drop any columns that aren't specified in the metacore object | ||
| drop_unspec_vars(metacore) # This will drop any columns that are not specified in the metacore object |
There was a problem hiding this comment.
ummm...should this step just go at the end or am i missing something?
Same here @bms63 - happy if you want to go ahead and make an issue for this one to get it added across all the blogs, if anyone has time to take it on. |
bundfussr
left a comment
There was a problem hiding this comment.
Is it possible to add a TOC to the pages like in the admiral vignettes?
Do we need to repeat so much information from the admiral vignettes?
It's not clear to me what we want to show. Do we want to show how to create an ADSL or ADVS dataset or how admiral and other pharmaverse packages work together?
In the former case I wonder why we show this in two places (admiral vignettes and pharmaverse examples). In the later case I would reduce the number of admiral function calls and focus on those where other packages are used like checks or writing xpt files or those where other packages provide alternative functions like deriving grouping variables.
adam/adsl.qmd
Outdated
| Now we have the base dataset, we can start to create some variables. | ||
| There are a few options to create grouping variables and their corresponding numeric variables. | ||
|
|
||
| Option 1: We can start with creating the subgroups using the controlled terminology, in this case `AGEGR1`. |
There was a problem hiding this comment.
At least "Option 1" should be bold.
@Fanny-Gautier I think this is definitely needed
Yes, primary goal is to show how the different packages work together. Secondary goal is to have more ready to go examples for teaching workshops. I think expanding the script is handy especially as @Fanny-Gautier has created a more robust specification file for the two datasets - we could handwave away/hide some of the derivations and say see the full script if it is indeed too wordy. TBD! Understood on we are repeating information here, but folks coming to this site I would think would like having the full script available to them rather than an abbreviated script and then have to go to admiral to get more derivations/information on that dataset. Maintaining alignment is something giving me anxiety. Regarding workshop goal - for ADSL we found a lot of stuff was pretty out of date and spec was pretty barebones. This update really brings stuff up to date for us. Hopefully, if someone wants to teach another workshop on programming ADSL from a spec to xpt file it will be almost 100% ready to go. Happy to keep discussing!! Thanks for the feedback |
|
Hi all, once all the above review comments are resolved I'm happy for this one to be approved/merged. I only had chance to review high level but I understand the perspective of having more "workshop-ready" examples, and this is something I also hear reflected in feedback from Posit colleagues. Thanks @Fanny-Gautier for all the efforts!! 🌟 |
|
@Fanny-Gautier as per chat today please name the specs file with "safety_specs" rather than ADSL, ADVS so that i can then add ADAE later in same file |
…create_var_from_codelist()` and show the corresponding metacore object
Co-authored-by: Stefan Bundfuss <80953585+bundfussr@users.noreply.github.com>
Co-authored-by: Stefan Bundfuss <80953585+bundfussr@users.noreply.github.com>
|
@jimrothstein Thanks a lot for your comments. Please find below my answers
This is more a CDISC's standard: There are the main data domains (=
The function takes in the previously created |
…e/examples into 73_add_adam_example_ADVS_ADSL
|
All good for now (Ben's comment to compare the options using |
|
Thanks @Fanny-Gautier for all the efforts here! I've merged now. Once Jeff's PR merges and I add the ADAE example then I'll post in pharmaverse slack to announce to the community we now have a better set of ADaM examples. |
|
@Fanny-Gautier many thanks for driving this through from the R/Pharma workshop. Thank you @rossfarrugia and @bundfussr for helping with review and great discussion!! Looking forward to ADAE! |





Pull Request
DESCRIPTION GOES HERE
Before you submit your pull request, take a look at the following checklist. Many thanks for your contribution!
Closes #<insert_issue_number>at the beginning of your PR title. Use the Edit button in the top-right if you need to update.DESCRIPTIONfile.DESCRIPTIONfile'sImportssection.