-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Decouple scda #858
Decouple scda #858
Conversation
Code Coverage Summary
Diff against main
Results for commit: 25c8435 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
R/dummy_functions.R
Outdated
ADSL$SEX[1:150] <- NA # nolint | ||
ADSL$SEX[c(2, 5)] <- NA # nolint | ||
|
||
cdisc_data_obj <- cdisc_data( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cdisc_data_obj <- cdisc_data( | |
cdisc_data_obj <- teal.data::cdisc_data( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though teal.data
is in Depends
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to stay consistent with the code nearby
@@ -111,41 +111,41 @@ | |||
#' @include modules.R | |||
#' | |||
#' @examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm still thinking about the example for this init()
function...
To me, most of the people looking at this example would came from clinical trials domain so it would be good to speak in the same language - i.e. use ADAM model. WDYT @lcd2yyz ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can copy paste data created in get_dummy_data
so we can have an ADaM alike data here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also vignette including-adam-data-in-teal.Rmd
for people who want to use teal in clinical trials domain. I'd prefer to keep teal::init
documentation generic.
ADSL <- data.frame( # nolint | ||
STUDYID = "study", | ||
USUBJID = 1:10, | ||
SEX = sample(c("F", "M"), 10, replace = TRUE), | ||
AGE = stats::rpois(10, 40) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it happens to repeat multiple times across the codebase (see my other comment about example in init() and also looking at the vignette) - please consider yet another (not so sure if private) object in the package namespace but please don't name it a "dummy" :P - make it "ex_adsl" or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pawelru it's a private function, used only in tests and documentation of other internal functions. Do you want this to still change it to ex_cdisc_data
or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only if it happens that this is being defined multiple times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pawelru I don't want to export example data function just for a sake of one publicly available examples. I think it make sense to show also cdisc_data()
call when calling teal::init
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed dummy_*
to example_*
and kept them as unexported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
- [ ] teal insightsengineering/teal#858 - [ ] teal.widgets - [ ] osprey insightsengineering/osprey#121 - [ ] teal.osprey insightsengineering/teal.osprey#214 - [ ] teal.transform insightsengineering/teal.transform#139 --------- Signed-off-by: Dawid Kałędkowski <[email protected]> Co-authored-by: kartikeya kirar <[email protected]>
- [ ] teal insightsengineering/teal#858 - [ ] teal.widgets - [ ] osprey insightsengineering/osprey#121 - [ ] teal.osprey insightsengineering/teal.osprey#214 - [ ] teal.transform insightsengineering/teal.transform#139
closes #834
see also: