Dear Sirs,

Running the following code with R devel (2020-11-30 r79529):

library(survival)
terms.formula(Surv(time, status) ~ . - time - status, data = lung[,
c("time", "status", "ph.ecog")])

gives:

  Warning message:
  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.

This is somewhat related to
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17895

but it does not have an error.

Sincerely Yours,
Benjamin

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to