I cannot seem to validate my data for survival analysis using the survival package.
It used to work.
Here is a MWE:
library(survival)
paper_test <- structure(
list(
time1 = c(0, 127),
time2 = c(127, 164),
time_status = c(1, 1),
project_id = c(200130, 200130)
),
row.names = c(NA, -2L),
class = c("tbl_df", "tbl", "data.frame")
)
survcheck(
Surv(time1, time2, time_status) ~ 1,
id = project_id,
data = paper_test
)
I get:
Error in colSums(transitions[, 1:nr]) :
'x' must be an array of at least two dimensions
Looks like a bug which is now fixed