Skip to content

Commit

Permalink
Avoid missing or unexported object error
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Jan 18, 2024
1 parent e23d917 commit edac046
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/add_highlight.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ add_highlight.ggsurvfit <- function(gg = NULL,
gg_gb <- ggplot2::ggplot_build(gg)

if ("get_guide_data" %in% getNamespaceExports("ggplot2")) {
strata_labels <- ggplot2::get_guide_data(gg_gb, "colour")$.label
get_guide_data <- get("get_guide_data", asNamespace("ggplot2"))
strata_labels <- get_guide_data(gg_gb, "colour")$.label
} else {
gg_gtable <- ggplot2::ggplot_gtable(gg_gb)
gg_guidebox_id <- base::which(base::sapply(
Expand Down

0 comments on commit edac046

Please sign in to comment.