-
Notifications
You must be signed in to change notification settings - Fork 21
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
Pull Request by Zilin Huang regarding Issue #216 #226
base: main
Are you sure you want to change the base?
Changes from 6 commits
53d9d9a
13246ff
49eb779
f698742
a118761
51354b6
48dc898
afe867c
79f51be
7d501d9
93d688c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,20 @@ | |
#' # specify additional scales | ||
#' ggsurvfit + | ||
#' scale_ggsurvfit(x_scales = list(breaks = seq(0, 8, by = 2))) | ||
#' | ||
#' # Specical case: in the risk table, large numbers (with more than 4 digits) may not | ||
#' # be shown completely, with some digits truncated outside the plot region. | ||
#' # To remedy this, consider the following example code for a simulated large-size survival dataset: | ||
#' # Here, adjust the size in `add_risktable(size = 2.5)` (as an example) can decrease the font size of the risk table | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason people see this issue is because the default padding when using The proposed fix is going to be a change to the expand scale argument in this function. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you @ddsjoberg a lot for your suggestion, I've already addressed this issue and inside the new commit. |
||
#' # and make the numbers all fit in the plot region. The scale of the `size` argument differs by cases. | ||
#' df_colon_large <- df_colon[sample(1:nrow(df_colon), size = 15*nrow(df_colon), replace = TRUE), ] | ||
#' ggsurvfit <- | ||
#' survfit2(Surv(time, status) ~ surg, data = df_colon_large) %>% | ||
#' ggsurvfit() + add_risktable(size = 2.5) + | ||
#' scale_ggsurvfit() | ||
#' @inherit ggsurvfit seealso | ||
scale_ggsurvfit <- function(x_scales = list(), y_scales = list()){ | ||
scale_ggsurvfit <- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you put this back on one line? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have already done this. It'll be ready to merge. |
||
function(x_scales = list(), y_scales = list()){ | ||
scale_ggsurvfit_empty_list <- list() | ||
structure(scale_ggsurvfit_empty_list, x_scales = x_scales, y_scales = y_scales, class = "scale_ggsurvfit") | ||
} | ||
|
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.
Instead of putting this text as a comment in the examples section, let's add it to a new section the help file using the
#' @details
tag.