Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning about missing terms column #175

Closed
ddsjoberg opened this issue Sep 19, 2022 · 3 comments · Fixed by #176
Closed

Warning about missing terms column #175

ddsjoberg opened this issue Sep 19, 2022 · 3 comments · Fixed by #176

Comments

@ddsjoberg
Copy link
Collaborator

This warning is being printed when I run the R CMD Checks. We should address this. If it's fine, we can add a suppressWarning() or something else?

library(broom.helpers)

mgcv::gam(response ~ grade, data = gtsummary::trial) |> 
  model_identify_variables()
#> Warning: Unknown or uninitialised column: `term`.
#> Unknown or uninitialised column: `term`.
#> # A tibble: 3 × 5
#>   term        variable var_class var_nlevels var_type   
#>   <chr>       <chr>    <chr>           <int> <chr>      
#> 1 (Intercept) <NA>     <NA>               NA intercept  
#> 2 gradeII     grade    factor              3 categorical
#> 3 gradeIII    grade    factor              3 categorical

Created on 2022-09-18 with reprex v2.0.2

@larmarange
Copy link
Owner

It seems related with a problem with broom.

library(broom.helpers)

mod <- mgcv::gam(response ~ grade, data = gtsummary::trial)

mod |> 
  broom::tidy()
#> Warning: Unknown or uninitialised column: `term`.
#> Unknown or uninitialised column: `term`.
#> # A tibble: 0 × 1
#> # … with 1 variable: term <chr>

Created on 2022-09-19 with reprex v2.0.2

@larmarange
Copy link
Owner

Sorry, it took me some time to remember GAM models.

We could just use a suppressWarning(). Could I suggest to also add it in gtsummary::tidy_gam()?

@ddsjoberg
Copy link
Collaborator Author

Thanks @larmarange !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants