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 SummaryDiff against mainResults 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. |
danielinteractive
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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_profilesfunction 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