tidymodels / broom

Convert statistical analysis objects from R into tidy format
https://broom.tidymodels.org
Other
1.45k stars 303 forks source link

Compatibility with mgcv package #169

Closed roxannebeauclair closed 6 years ago

roxannebeauclair commented 7 years ago

Greetings,

I see that broom is compatible with the gam package. Is it possible to also do so with the mgcv package for generalised additive models?

Warm regards, Roxy

adibender commented 7 years ago

There is support for mgcv gam objects. Did you try the newest version of broom?

adibender commented 7 years ago

I was mistaken, the functions work in some situations, because the objects returned from mgcv::gam and gam::gam are both of class gam.

alexpghayes commented 6 years ago

This got added at some point!

m <- mgcv::gam(mpg ~ s(hp), data = mtcars)
broom::tidy(m)
#> Warning: package 'bindrcpp' was built under R version 3.4.4
#>    term      edf   ref.df statistic      p.value
#> 1 s(hp) 2.618499 3.262509  26.25636 2.289197e-10
github-actions[bot] commented 3 years ago

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.