tidyverse / modelr

Helper functions for modelling
https://modelr.tidyverse.org
GNU General Public License v3.0
401 stars 65 forks source link

Call line in output #97

Closed ggrothendieck closed 4 years ago

ggrothendieck commented 5 years ago

The Call: line in the output shows .f instead of lm.


> fit_with(BOD, lm, list(demand ~ .))
[[1]]

Call:
.f(formula = demand ~ ., data = data)

Coefficients:
(Intercept)         Time  
      8.521        1.721  

Also this works but if we omit the expr and just have family = gaussian a ton of junk gets printed out. Is it really necessary to use expr here?

library(rlang)
fit_with(BOD, glm, list(demand ~ .), family = expr(gaussian))
hadley commented 4 years ago

This is due to the way that lm() inlines it's calling context. I don't think there's an easy way to fix this (and this package is in a holding pattern).