[Rd] new behavior of model.response
Therneau, Terry M., Ph.D.
therne@u @ending from m@yo@edu
Wed Jun 27 22:54:20 CEST 2018
Charles Berry pointed out an error in my reasoning. In the current survival I forgot the
S3method line for length in the NAMESPACE file, so the behavior is really not new.
Nonetheless it remains surprising and non-intuitive. Why does model.response sometimes
attach spurious names, when the Surv object itself does not have them?
tmt% R --vanilla
R version 3.4.2 (2017-09-28) -- "Short Summer"
test <- data.frame(time=1:8, status=rep(0:1, 4), age=60:67)
row.names(test) <- letters[1:8]
mf2 <- model.frame(Surv(time, status) ~ age, data=test)
length.Surv <- survival:::length.Surv
#  "a" "b" "c" "d" "e" "f" "g" "h" NA NA NA NA NA NA NA NA
[[alternative HTML version deleted]]
More information about the R-devel