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]