From 64a64bd88a09dcc3dd6352bcfb55e3d1fc4e26be Mon Sep 17 00:00:00 2001 From: muschellij2 Date: Fri, 15 May 2020 00:13:42 -0400 Subject: [PATCH] strata is now a factor with levels based on the order of strata variable when plotting ggcompetingrisks for survfitms --- R/ggcompetingrisks.R | 1 + 1 file changed, 1 insertion(+) 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(