Closed simonpcouch closed 2 months ago
The definitions of nobs.survreg()
are identical, so we can just remove broom's method. For coxph
:
survival:::nobs.coxph
function (object, ...)
object$nevent
<bytecode: 0x16cc8f0e0>
<environment: namespace:survival>
while in broom:
nobs.coxph
function(object, ...) {
length(object$linear.predictors)
}
<environment: namespace:broom>
broom's definition is copied over for its nobs.survreg()
, it seems.
Wooooof. With the fit
objects from the tests:
for (f in list(fit, fit2, fit3, fit4, fit5, fit6)) {
cat(paste0(survival:::nobs.coxph(f), " ", broom:::nobs.coxph(f)))
cat("\n")
}
#> 165 228
#> 165 228
#> 164 227
#> 112 340
#> 897 1822
#> 897 1822
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
On
devtools::document()
: