Skip to content

Commit d5f7bcc

Browse files
MouksassiMouksassi
authored andcommitted
added km_linewidth requested by Sejung
1 parent a798e03 commit d5f7bcc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

R/ggkmrisktable.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ lung_long$facetdum <- "(all)"
172172
#' @param km_logrank_pvalue_cutoff pvalue below which to print as p < cutoff
173173
#' @param km_logrank_pvalue_digits pvalue ndigits for round function
174174
#' @param km_trans one of "identity","event","cumhaz","cloglog"
175+
#' @param km_linewidth linewidth for the km curves default to 1
175176
#' @param km_ticks TRUE
176177
#' @param km_band TRUE
177178
#' @param km_conf_int 0.95
@@ -321,6 +322,7 @@ ggkmrisktable <- function(data = lung_long, # long format filter to Endpoint of
321322
km_logrank_pvalue_cutoff = 0.001,
322323
km_logrank_pvalue_digits = 3,
323324
km_trans = c("identity","event","cumhaz","cloglog"),
325+
km_linewidth = 1,
324326
km_ticks = TRUE,
325327
km_band = TRUE,
326328
km_conf_int = 0.95,
@@ -586,7 +588,7 @@ ggkmrisktable <- function(data = lung_long, # long format filter to Endpoint of
586588
plotkm0 <- ggplot2::ggplot(data.long,ggplot2::aes_string(time = time, status = status,
587589
color = colorinputvar, fill = fillinputvar,
588590
linetype = linetypeinputvar))+
589-
ggplot2::geom_line(stat = "km",trans = km_trans)
591+
ggplot2::geom_line(stat = "km",trans = km_trans, linewidth = km_linewidth)
590592
if(km_band){
591593
plotkm00 <- plotkm0 +
592594
ggplot2::geom_ribbon(stat = "kmband", alpha=0.2, color = "transparent",

man/ggkmrisktable.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)