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
Warning messages:
1: In geom_segment(aes(x = 0, y = max(y2), xend = max(x1), yend = max(y2)), :
All aesthetics have length 1, but the data has 2 rows.
ℹ Did you mean to use `annotate()`?
2: In geom_segment(aes(x = 0, y = max(y2), xend = max(x1), yend = max(y2)), :
All aesthetics have length 1, but the data has 2 rows.
ℹ Did you mean to use `annotate()`?
Steps to reproduce the problem
library(survival)
data<-survival::lungfit1<- survfit(Surv(time, status) ~sex, data=data)
# produces warning from ggplot2 3.5.0survminer::ggsurvplot(
fit=fit1,
data=data,
surv.median.line="hv"
)
#> Warning in geom_segment(aes(x = 0, y = max(y2), xend = max(x1), yend = max(y2)), : All aesthetics have length 1, but the data has 2 rows.#> ℹ Did you mean to use `annotate()`?#> All aesthetics have length 1, but the data has 2 rows.#> ℹ Did you mean to use `annotate()`?
# works fine w/o surv.median.linesurvminer::ggsurvplot(
fit=fit1,
data=data
)
# works fine with only one suvival curvefit2<- survfit(Surv(time, status) ~1, data=data)
survminer::ggsurvplot(
fit=fit2,
data=data,
surv.median.line="hv"
)
Expected behavior
No warnings from ggplot2.
Actual behavior
Steps to reproduce the problem
Created on 2024-02-27 with reprex v2.1.0
session_info()
Session info
The text was updated successfully, but these errors were encountered: