You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs for the pval argument in ggsurvplot_facet() are copy-pasted from ggsurvplot(). They say:
pval: logical value, a numeric or a string. If logical and TRUE, the p-value is added on the plot. If numeric, than the computet p-value is substituted with the one passed with this parameter. If character, then the customized string appears on the plot. See examples - Example 3.
This suggests that giving a vector of new values will insert those values in each facet.
Actual behavior/steps to reproduce
library(survival)
library(survminer)
#> Loading required package: ggplot2#> Loading required package: ggpubr#> #> Attaching package: 'survminer'#> The following object is masked from 'package:survival':#> #> myeloma# Facet by one grouping variables: rx#::::::::::::::::::::::::::::::::::::::::::::::::::::::::fit<- survfit( Surv(time, status) ~sex, data=colon )
ggsurvplot_facet(fit, colon, facet.by="rx",
palette="jco", pval=TRUE)
#> Warning: `as.tibble()` was deprecated in tibble 2.0.0.#> ℹ Please use `as_tibble()` instead.#> ℹ The signature and semantics have changed, see `?as_tibble`.#> ℹ The deprecated feature was likely used in the survminer package.#> Please report the issue at <https://github.com/kassambara/survminer/issues>.#> This warning is displayed once every 8 hours.#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was#> generated.#> Warning: `select_()` was deprecated in dplyr 0.7.0.#> ℹ Please use `select()` instead.#> ℹ The deprecated feature was likely used in the survminer package.#> Please report the issue at <https://github.com/kassambara/survminer/issues>.#> This warning is displayed once every 8 hours.#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was#> generated.
# Facet by two grouping variables: rx and adhere#::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ggsurvplot_facet(fit, colon, facet.by= c("rx", "adhere"),
palette="jco", pval=0.34534)
# Another fit#::::::::::::::::::::::::::::::::::::::::::::::::::::::::fit2<- survfit( Surv(time, status) ~sex+rx, data=colon )
ggsurvplot_facet(fit2, colon, facet.by="adhere",
palette="jco", pval="test")
#> Error in if (pval) {: argument is not interpretable as logical
Expected behavior
The docs for the
pval
argument inggsurvplot_facet()
are copy-pasted fromggsurvplot()
. They say:This suggests that giving a vector of new values will insert those values in each facet.
Actual behavior/steps to reproduce
Created on 2023-12-19 with reprex v2.0.2
session_info()
The text was updated successfully, but these errors were encountered: