-
Notifications
You must be signed in to change notification settings - Fork 10
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
783 profile plots #792
base: main
Are you sure you want to change the base?
783 profile plots #792
Conversation
…ended doses (NCRMLoss): crmPack vs. SAS
…ended doses (NCRMLoss): crmPack vs. SAS
Merge branch 'test-sas-results' of github.com:Roche/crmPack into test-sas-results # Conflicts: # tests/testthat/test-sas-results.R
Merge branch 'test-sas-results' of github.com:Roche/crmPack into test-sas-results # Conflicts: # tests/testthat/test-sas-results-part-1.R
Code Coverage Summary
Diff against main
Results for commit: b2ba80b Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Test Performance Difference
Additional test case details
Results for commit 4a87aec ♻️ This comment has been updated with latest results. |
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.
thanks @marlenesg , nice work (and nice small PR!! Great!) - on top of comments below, can you please add test(s)?
) | ||
setMethod( | ||
f = "profiles", | ||
signature = signature(x = "Data", xNE = "data.frame", unit = "character"), |
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.
how about another name instead of xNE
? e.g. x_not_eval
?
p <- ggplot(data = df) + | ||
geom_point( | ||
aes( | ||
x = factor(ID, levels = unique(ID[order(cohort, ID)])), |
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 think we might need to work with
x = factor(ID, levels = unique(ID[order(cohort, ID)])), | |
x = factor(.data$ID, levels = unique(.data$ID[order(.data$cohort, .data$ID)])), |
etc. to avoid R CMD check
notes about missing global variables, please double check the R CMD check
output
scale_shape_manual(values = c( | ||
"DLT No" = 19, "DLT Yes" = 17, | ||
"Not evaluable" = 0 | ||
), drop = FALSE) + |
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 would recommend making this configurable by the user, i.e. here:
scale_shape_manual(values = c( | |
"DLT No" = 19, "DLT Yes" = 17, | |
"Not evaluable" = 0 | |
), drop = FALSE) + | |
scale_shape_manual(values = scale_shape_values, drop = FALSE) + |
and in the arguments of this method
scale_shape_values = c(
"DLT No" = 19, "DLT Yes" = 17,
"Not evaluable" = 0
)
so that the user can keep defaults, or modify this
"Not evaluable" = 0 | ||
), drop = FALSE) + | ||
scale_color_manual( | ||
values = c( |
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.
same idea also here
theme_bw() + | ||
theme(plot.title = element_text(hjust = 0.5)) + | ||
theme(legend.title = element_blank()) + | ||
theme( | ||
legend.background = element_blank(), | ||
legend.box.background = element_rect(colour = "black"), | ||
axis.text.x = element_text(angle = 45, hjust = 1) | ||
) |
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 would keep the theme
modifiable by the user.
options:
- completely omit this here to just use the default theme
- if that does not look ok, then define a
theme_profiles
function that returns this and in this method have argumenttheme = theme_profiles()
that is then used here, but the user could modify it
@marlenesg any questions / should we go through comments together? |
Pull Request
Added the code for profile plots in Data-methods.R. I am not sure why the old changes in tests/testthat/test-sas-results-part-1.R and tests/testthat/test-sas-results-part-2.R are showing up. These changes have already been merged into the main branch previously.
Partially fixes #783