Skip to content

Commit

Permalink
relax regex in tidy.car() (closes #1215)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Sep 26, 2024
1 parent 35a451a commit 8e04637
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ Suggests:
binGroup,
boot,
btergm (>= 1.10.6),
car,
car (>= 3.1-2),
carData,
caret,
cluster,
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# broom (development version)

* Addressed failure in `tidy.anova()` ahead of upcoming car
release (#1215).

* Clarified documentation for a number of cases where dots were
documented as unused but actually passed to internal functions
(#1214).
Expand Down
2 changes: 1 addition & 1 deletion R/stats-anova-tidiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ tidy.anova <- function(x, ...) {
modstr <- "[Mm]od.*[0-9]+:"
mod_lines <- grep(modstr, x_attr$heading, value = TRUE)
if (!is.null(x_attr$value)) {
if (isTRUE(grepl("^Linear hypothesis", x_attr$heading[[1]]))) {
if (isTRUE(grepl("Linear hypothesis", x_attr$heading[[1]]))) {
# Drop unrestricted model (not interesting in linear hypothesis tests)
# Use formula to subset if available (e.g. with car::linearHypothesis)
if (length(mod_lines) != 0) {
Expand Down

0 comments on commit 8e04637

Please sign in to comment.