Rapporter / pander

An R Pandoc Writer: Convert arbitrary R objects into markdown
http://rapporter.github.io/pander/
Open Software License 3.0
294 stars 66 forks source link

partial match on x$coeff #367

Open r2evans opened 9 months ago

r2evans commented 9 months ago

The lm object has a property named coefficients, but the code refers to it as x$coeff. When options(warnPartialMatchDollar=TRUE), this emits a warning. (I found this while working on a PR for logger and running unit-tests that use logger::formatter_pander.)

https://github.com/Rapporter/pander/blob/7d5d9dd1b2d8f927737b8bb1f469679450cef43c/R/S3.R#L344

Options:

  1. use stats::coef(x) (seems the canonical approach), or
  2. switch to x$coefficients