You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tidy.anova provides an error message when one or more of the models being tested contains many predictors.
This is presumably due to the following lines of code:
line 63 mod_lines <- grep(modstr, x_attr$heading, value = TRUE)
line 96 mods <- sub(".*: ", "", strsplit(mod_lines, "\n")[[1]]).
These lines are used to obtain the model formula from the anova heading attributes and then try to split the heading into separate lines based upon line breaks \n. Unfortunately, extra \n are inserted throughout the formula in the headings of large models.
This could be fixed by adding mod_lines <- gsub("\n ", "", mod_lines) under line 63 to remove the extra \n.
Also, the warning message about unrecognised column names (Resid..Df, Resid..Dev, Deviance) when tidying anova.glm objects could be removed by addng these terms to the renamers object at the beginning of the code.
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.
The problem
tidy.anova
provides an error message when one or more of the models being tested contains many predictors.This is presumably due to the following lines of code:
mod_lines <- grep(modstr, x_attr$heading, value = TRUE)
mods <- sub(".*: ", "", strsplit(mod_lines, "\n")[[1]])
.These lines are used to obtain the model formula from the
anova
heading attributes and then try to split the heading into separate lines based upon line breaks\n
. Unfortunately, extra\n
are inserted throughout the formula in the headings of large models.This could be fixed by adding
mod_lines <- gsub("\n ", "", mod_lines)
under line 63 to remove the extra\n
.Also, the warning message about unrecognised column names (Resid..Df, Resid..Dev, Deviance) when tidying
anova.glm
objects could be removed by addng these terms to therenamers
object at the beginning of the code.Reproducible example
The text was updated successfully, but these errors were encountered: