From bbo|ker @end|ng |rom gm@||@com  Wed Feb  2 03:21:46 2022
From: bbo|ker @end|ng |rom gm@||@com (Ben Bolker)
Date: Tue, 1 Feb 2022 21:21:46 -0500
Subject: [Rd] model.weights and model.offset: request for adjustment
Message-ID: <1e70261f-3379-092a-2c11-f835d3d8ff70@gmail.com>

   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



[Rd] model.weights and model.offset: request for adjustment
Ben Bolker