The model.weights() and model.offset() functions from the 'stats'
package index possibly-missing elements of a data frame via $, e.g.
x$"(offset)"
x$"(weights)"
This returns NULL without comment when x is a data frame:
x <- data.frame(a=1)
x$"(offset)" ## NULL
x$"(weights)" ## NULL
However, when x is a tibble we get a warning as well:
x <- tibble::as_tibble(x)
x$"(offset)"
## NULL
## Warning message:
## Unknown or uninitialised column: `(offset)`.
I know it's not R-core's responsibility to manage forward
compatibility with tibbles, but in this case [[-indexing would seem to
be better practice in any case.
Might a patch be accepted ... ?
cheers
Ben Bolker
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel