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 text was updated successfully, but these errors were encountered:
ThomasSoeiro
changed the title
n.risk value for time == 0 is not correct when length(strata) > 1 in fortify.survfit().n.risk value for time == 0 is not correct when nlevels(strata) > 1 in fortify.survfit().
Mar 8, 2024
ThomasSoeiro
changed the title
n.risk value for time == 0 is not correct when nlevels(strata) > 1 in fortify.survfit().n.risk at time == 0 is not correct when nlevels(strata) > 1 in fortify.survfit(*, surv.connect = TRUE)Mar 8, 2024
System information
Describe the problem
n.risk
attime == 0
is not correct whennlevels(strata) > 1
infortify.survfit(*, surv.connect = TRUE)
.Source code / logs / plots
The issue is from:
ggfortify/R/fortify_surv.R
Line 65 in 5ed9524
Maybe it can be changed to
d[d$time == ave(d$time, d$strata, FUN = min), ]
.And then this will need to be simplified:
ggfortify/R/fortify_surv.R
Lines 73 to 79 in 5ed9524
The text was updated successfully, but these errors were encountered: