The explain_survival function will fail if there is only 1 variable in the model. As the code below will convert this data to a vector and the nrow(data) will return NULL. Hence the n will be NULL and line 220 will fail.
|
data <- possible_data[, -1] |
This can be fixed by changing this line to
data <- possible_data[, -1, drop = FALSE]
The
explain_survivalfunction will fail if there is only 1 variable in the model. As the code below will convert this data to a vector and thenrow(data)will returnNULL. Hence thenwill beNULLand line 220 will fail.survex/R/explain.R
Line 175 in cb0852a
This can be fixed by changing this line to