-
Notifications
You must be signed in to change notification settings - Fork 69
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
Bug: The result of derive_param_tte()
depends on the sort order of the input
#2481
Comments
Is this a bug we need to push a patch out for or something we can wait on till next release? |
I'd say next release as its not a bug as such (the function does what it says) - its more just the lack of a useful feature |
Should I tag the team and community team to see if anyone is interested or do we feel like this is a bit more complicated? |
I think it is something in between a bug and a feature. Maybe we should call it a gap because for the scenario of more than one record per date the expected behavior of the function is not described. I think it is OK to tag the team and community team but it shouldn't be labelled as "good first issue". It could be a good issue for team members who have some time and are interested in getting familiar with one of the more complex admiral functions. |
@pharmaverse/admiral and @pharmaverse/admiral_comm this is a good one to tackle, but it is not a "good first issue". You will get into the weeds a bit, but great way to learn more about admiral!! |
@bms63 @bundfussr @rossfarrugia I have some free time and can take a look. When is our next release date again? |
thanks @ProfessorP-beep - it's early Dec: see https://pharmaverse.github.io/admiral/#release-schedule |
Ha sorry @manciniedoardo - i quoted from the site, but think I remember you and Ben saying it'll push back to Jan |
at the rate we are going we might just do a release in early December. Work has really chilled out! Unless you want to lead some huge refactor @rossfarrugia ?? |
@ProfessorP-beep will this one be ready for the next release? If you were able to get the updates in |
@rossfarrugia Sorry, things got very chaotic at work and I had to shift focus. Give me a week and I can update you on if I can get it done by the next release. |
Should have a lot of time to work on this the rest of the week and aiming to get a push out by Friday / Saturday. |
…rder of the input (#2569) * Added order arguments to censor_source and event_source. Also added signal_duplicate_records to derive_param_tte. Still troubleshooting the test-derive_param_tte script. Failed tests have a "Required variable `AEDECOD` is missing in `dataset`" error. * Added order argument to tte_source as part of development and error fixes. * Fixed previous erros but still need to address failed tests for Test 9, 15, and 16 in test-derive_param_tte * added check_type arg_match to derive_param_tte so user has to input a valid argument * Changed position of signal_duplicate_records function in derive_param_tte to fix missing data error * lintr changes by removing whitespace. * styler fix. Pushing again and confirmed check_type argument is in derive_var_obs_number in derive_joined.R scripts * updated NEWS.md with changes to derive_param_tte,. Removed Test 17 from test-derive_param_tte as it was redundant, and ran pharmaverse4devs format test script addin to format testest-derive_param_tte. * changed the signal_duplicate_records within derive_parame_tte to handle dataset_adsl and source_datasets by combining them with bind_rows before to address error of AEDECOD missing from the dataset when just calling dataset_adsl. This starts on line 381 of derive_param_tte.R * added a tryCatch() to filter_date_sources to catch duplicates to address failed runs in Test 16 of test-derive_param_tte. removed signal_duplicate_records() from within derive_param_tte Still need to troubleshoot errors in test script. * Moved duplication check to filter_date_sources in tryCatch() and rewrote Test 15 and 16 on test-derive_param_tte to deal with update to duplicate warnings within tryCatch and not directly by signal_duplicate_records inside derive_param_tte function. Accepted snapshots from devtools::check * 1. Moved updates in News section to admiral dev section 2. Made suggested fixes to derive_param_tte script. * Ran styler, lintr fixes, and devtools check. * styler changes * accepted snapshots from testthat and addressed bds_tte.Rmd error for devtool checks() * added documentation for order and check_type arguments added to functions. Directly called rlang::try_fetch in derive_param_tte script. * requested updates to documentation and test script for derive_param_tte * corrected documentation and removed rlang from bds_tte.Rmd * updated derive_param_tte documentation and added test to derive_param_tte test script. * fixed spelling error * updates to derive_param_tte documentation and test examples. * Update NEWS.md Co-authored-by: Stefan Bundfuss <[email protected]> * update to derive_param_tte test, function examples, and documentation. * snapshots accepted * passed local checks. Pushing again * ran styler * added "message" as a option for check_type in derive_var_obs_number * Update NEWS.md Co-authored-by: Ben Straub <[email protected]> * #2481: cosmetics * #2481: fix lintr --------- Co-authored-by: Stefan Bundfuss <[email protected]> Co-authored-by: Ben Straub <[email protected]> Co-authored-by: Stefan Bundfuss <[email protected]>
What happened?
The result of
derive_param_tte()
depends on the sort order of the input. See example below.An
order
argument should be added toevent_source()
andcensor_source()
. It should be defaulted toNULL
. It expects a list of variables, which are used in addition todate
for sorting the input data.The
check_type
argument should be added toderive_param_tte()
and defaulted to"warning"
. The uniqueness of the selected records should be checked by callingsignal_duplicate_records()
.Session Information
No response
Reproducible Example
produces
but
produces
The text was updated successfully, but these errors were encountered: