Feature request: better warning message from or documentation of terms.formula when LHS variables are after . - on RHS
Running the following code with R devel (2020-11-30 r79529):
terms.formula(Surv(time, status) ~ . - time - status, data = lung[,
c("time", "status", "ph.ecog")])
In terms.formula(Surv(time, status) ~ . - time - status, data = lung[, :
'varlist' has changed (from nvar=2) to new 4 after EncodeVars() --
should no longer happen!
It took me a while to figure out that the cause of the warning is that
time and status appear on both the left hand side and on the right
hand side of the formula after a period and a minus. While this is
likely an error or redundant in almost all cases, it was unclear from
the warning and the .Rd file.