-
-
Notifications
You must be signed in to change notification settings - Fork 3
init commit #141
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
base: main
Are you sure you want to change the base?
init commit #141
Conversation
|
try and use exisitng structure and surv functions, refactoring will be addressed in #142 |
Unit Tests Summary 1 files 69 suites 1m 27s ⏱️ Results for commit d5a79b7. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit b524fa0 ♻️ This comment has been updated with latest results. |
Code Coverage SummaryDiff against mainResults for commit: d5a79b7 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
|
need examples and export |
|
my styler is failing, @edelarua , i was wondering how you guys check style here https://github.com/insightsengineering/crane/actions/runs/19792793759/job/56708402248?pr=141 |
Missing link(s) in Rd file 'annot_surv_med.Rd': Missing link(s) in Rd file 'h_tbl_coxph_pairwise.Rd': Missing link(s) in Rd file 's_coxph_pairwise.Rd': See section 'Cross-references' in the 'Writing R Extensions' manual.
|
| #' @param bg_fill Optional color string for the plot background. | ||
| #' @keywords internal | ||
| #' @return A \code{ggplot2} object representing the table. | ||
| #' @importFrom ggplot2 ggplot theme_void scale_x_continuous scale_y_continuous theme element_rect annotate element_text .pt |
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.
we have the import. Is enought to add the @import for the package
| #' @keywords internal | ||
| #' @import rlang | ||
| #' @import glue glue | ||
| #' @importFrom utils tail |
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 import ggplot2 here
| f_conf_level <- function(conf_level) { | ||
| # assert_proportion_value(conf_level) # Assuming assert_proportion_value is defined elsewhere | ||
| paste0(conf_level * 100, "% CI") | ||
| } | ||
|
|
||
| control_surv_med_annot <- function(x = 0.8, y = 0.85, w = 0.32, h = 0.16, fill = TRUE) { | ||
| # assert_proportion_value(x) | ||
| # assert_proportion_value(y) | ||
| # assert_proportion_value(w) | ||
| # assert_proportion_value(h) | ||
|
|
||
| list(x = x, y = y, w = w, h = h, fill = fill) | ||
| } | ||
|
|
||
| control_coxph_annot <- function(x = 0.29, y = 0.51, w = 0.4, h = 0.125, fill = TRUE, ref_lbls = FALSE) { | ||
| checkmate::assert_logical(ref_lbls, any.missing = FALSE) | ||
|
|
||
| res <- c(control_surv_med_annot(x = x, y = y, w = w, h = h), list(ref_lbls = ref_lbls)) | ||
| res | ||
| } |
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.
maybe is best if all help functions are into an help file (utils_plot?)
| #' @importFrom broom tidy | ||
| #' @importFrom tidyr pivot_wider | ||
| #' @importFrom cowplot plot_grid | ||
| #' @importFrom ggplot2 labs theme_bw theme element_text element_blank element_line coord_cartesian scale_x_continuous scale_y_continuous |
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.
should we keep the imports here?
Missing examples
What changes are proposed in this pull request?
NEWS.md. (#, @)Provide more detail here as needed.
Reference GitHub issue associated with pull request. e.g., 'closes #'
Pre-review Checklist (if item does not apply, mark is as complete)
usethis::pr_merge_main()devtools::test_coverage()Reviewer Checklist (if item does not apply, mark is as complete)
pkgdown::build_site(). Check the R console for errors, and review the rendered website.devtools::test_coverage()When the branch is ready to be merged:
NEWS.mdwith the changes from this pull request under the heading "# cards (development version)". If there is an issue associated with the pull request, reference it in parentheses at the end update (seeNEWS.mdfor examples).