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
It seems that tbl_survfit() fails when times is an integer.
This happens mostly when using the : operator.
Here is a reprex:
library(survival)
library(gtsummary)
tbl_survfit(
survfit(Surv(ttdeath, death) ~trt, trial),
times=1:2
)
#> Error in `tbl_survfit.list()`:#> ! The `times` argument must be class <numeric> or empty, not an integer#> vector.
Update check_class(times, "numeric") to check_class(times, c("numeric", "integer")), then we should be good to go. Also review the rest of the pkg for check_class(x, "numeric") to see if we need to update those as well.
Hi,
It seems that
tbl_survfit()
fails whentimes
is an integer.This happens mostly when using the
:
operator.Here is a reprex:
Created on 2024-07-24 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: