diff --git a/R/ggcompetingrisks.R b/R/ggcompetingrisks.R index 36662f8..407899b 100644 --- a/R/ggcompetingrisks.R +++ b/R/ggcompetingrisks.R @@ -106,6 +106,7 @@ ggcompetingrisks.survfitms <- function(fit) { psta$strata <- "all" } else { psta$strata <- rep(names(fit$strata), fit$strata) + psta$strata <- factor(psta$strata, levels = names(fit$strata)) } psta$times <- times psta <- .rename_empty_colname(