From 452b5351de16eef5bf59016dbd9bfacd5e78c5cb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Sep 2025 01:33:28 +0000 Subject: [PATCH 1/9] Initial plan From 92fd93f6318eaaad56cdb59a8db176ad4a37c4b4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Sep 2025 01:44:25 +0000 Subject: [PATCH 2/9] Fix lint issues in report.estimate_contrasts.R Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com> --- DESCRIPTION | 2 +- NEWS.md | 1 + R/report.estimate_contrasts.R | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 97a52d4fc..0d2ee1638 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: report Type: Package Title: Automated Reporting of Results and Statistical Models -Version: 0.6.1.3 +Version: 0.6.1.4 Authors@R: c(person(given = "Dominique", family = "Makowski", diff --git a/NEWS.md b/NEWS.md index b3726d1ae..2acc3940a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ Bug fixes +* Fixed lint issues in `report.estimate_contrasts()` by addressing line length violations * Fixed a lot of linting issues across the package. * Fixed duplicated text output in `report()` for glmmTMB objects by addressing both regex pattern and redundant CI information concatenation in `report_info.lm()` (#481) * Fixed issue with missing effect size for the Intercept term in type 3 anova tables (#451) diff --git a/R/report.estimate_contrasts.R b/R/report.estimate_contrasts.R index 86a1edb59..003d0f85b 100644 --- a/R/report.estimate_contrasts.R +++ b/R/report.estimate_contrasts.R @@ -9,7 +9,8 @@ #' #' @inherit report return seealso #' -#' @examplesIf all(insight::check_if_installed(c("modelbased", "marginaleffects", "collapse", "Formula"), quietly = TRUE)) +#' @examplesIf all(insight::check_if_installed(c("modelbased", +#' "marginaleffects", "collapse", "Formula"), quietly = TRUE)) #' library(modelbased) #' model <- lm(Sepal.Width ~ Species, data = iris) #' contr <- estimate_contrasts(model) @@ -42,11 +43,13 @@ report_text.estimate_contrasts <- function(x, table = NULL, ...) { ifelse(x$Difference < 0, " negative", "positive"), " and statistically ", ifelse(x$p < 0.05, "significant", "non-significant"), " (difference = ", f_table$Difference, ", 95% CI ", f_table$`95% CI`, ", ", - names(f_table)[6], " = ", f_table[[6]], ", ", insight::format_p(table$p), ")", + names(f_table)[6], " = ", f_table[[6]], ", ", insight::format_p(table$p), + ")", collapse = ". " ) - text <- paste("The marginal contrasts analysis suggests the following.", paste(text, collapse = "")) + text <- paste("The marginal contrasts analysis suggests the following.", + paste(text, collapse = "")) as.report_text(text) } From 0d8e68db8762128355aa1bc8e7ab4612ab26a63e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Sep 2025 01:57:55 +0000 Subject: [PATCH 3/9] Use correct easystats linting configuration (120 char limit) Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com> --- R/report.estimate_contrasts.R | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/R/report.estimate_contrasts.R b/R/report.estimate_contrasts.R index 003d0f85b..306a098d3 100644 --- a/R/report.estimate_contrasts.R +++ b/R/report.estimate_contrasts.R @@ -43,13 +43,11 @@ report_text.estimate_contrasts <- function(x, table = NULL, ...) { ifelse(x$Difference < 0, " negative", "positive"), " and statistically ", ifelse(x$p < 0.05, "significant", "non-significant"), " (difference = ", f_table$Difference, ", 95% CI ", f_table$`95% CI`, ", ", - names(f_table)[6], " = ", f_table[[6]], ", ", insight::format_p(table$p), - ")", + names(f_table)[6], " = ", f_table[[6]], ", ", insight::format_p(table$p), ")", collapse = ". " ) - text <- paste("The marginal contrasts analysis suggests the following.", - paste(text, collapse = "")) + text <- paste("The marginal contrasts analysis suggests the following.", paste(text, collapse = "")) as.report_text(text) } From adc4c1a47db310da94286057b62d1d6af71715c6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Sep 2025 02:08:57 +0000 Subject: [PATCH 4/9] Fix all lint issues in report.estimate_contrasts.R Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com> --- R/report.estimate_contrasts.R | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/R/report.estimate_contrasts.R b/R/report.estimate_contrasts.R index 306a098d3..4ff60ee2e 100644 --- a/R/report.estimate_contrasts.R +++ b/R/report.estimate_contrasts.R @@ -18,10 +18,10 @@ #' @return An object of class [report()]. #' @export report.estimate_contrasts <- function(x, ...) { - table <- report_table(x, ...) - text <- report_text(x, table = table, ...) + report_table_obj <- report_table(x, ...) + report_text_obj <- report_text(x, table = report_table_obj, ...) - as.report(text, table = table, ...) + as.report(report_text_obj, table = report_table_obj, ...) } # report_table ------------------------------------------------------------ @@ -39,7 +39,7 @@ report_table.estimate_contrasts <- function(x, ...) { report_text.estimate_contrasts <- function(x, table = NULL, ...) { f_table <- insight::format_table(table) - text <- paste0("The difference between ", x$Level1, " and ", x$Level2, " is ", + report_text_obj <- paste0("The difference between ", x$Level1, " and ", x$Level2, " is ", ifelse(x$Difference < 0, " negative", "positive"), " and statistically ", ifelse(x$p < 0.05, "significant", "non-significant"), " (difference = ", f_table$Difference, ", 95% CI ", f_table$`95% CI`, ", ", @@ -47,7 +47,8 @@ report_text.estimate_contrasts <- function(x, table = NULL, ...) { collapse = ". " ) - text <- paste("The marginal contrasts analysis suggests the following.", paste(text, collapse = "")) + report_text_obj <- paste("The marginal contrasts analysis suggests the following.", + paste(report_text_obj, collapse = "")) - as.report_text(text) + as.report_text(report_text_obj) } From 590c2c0e54a1fc1d92844c84367d8782a1c3180d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Sep 2025 02:26:31 +0000 Subject: [PATCH 5/9] Fix @examplesIf parsing and styler issues in report.estimate_contrasts.R Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com> --- R/report.estimate_contrasts.R | 9 +++++---- man/report.compare.loo.Rd | 2 +- man/report.estimate_contrasts.Rd | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/R/report.estimate_contrasts.R b/R/report.estimate_contrasts.R index 4ff60ee2e..59efb0009 100644 --- a/R/report.estimate_contrasts.R +++ b/R/report.estimate_contrasts.R @@ -9,8 +9,7 @@ #' #' @inherit report return seealso #' -#' @examplesIf all(insight::check_if_installed(c("modelbased", -#' "marginaleffects", "collapse", "Formula"), quietly = TRUE)) +#' @examplesIf all(insight::check_if_installed(c("modelbased", "marginaleffects", "collapse", "Formula"))) #' library(modelbased) #' model <- lm(Sepal.Width ~ Species, data = iris) #' contr <- estimate_contrasts(model) @@ -47,8 +46,10 @@ report_text.estimate_contrasts <- function(x, table = NULL, ...) { collapse = ". " ) - report_text_obj <- paste("The marginal contrasts analysis suggests the following.", - paste(report_text_obj, collapse = "")) + report_text_obj <- paste( + "The marginal contrasts analysis suggests the following.", + paste(report_text_obj, collapse = "") + ) as.report_text(report_text_obj) } diff --git a/man/report.compare.loo.Rd b/man/report.compare.loo.Rd index ae8395304..7e715b70a 100644 --- a/man/report.compare.loo.Rd +++ b/man/report.compare.loo.Rd @@ -7,7 +7,7 @@ \method{report}{compare.loo}(x, include_IC = TRUE, include_ENP = FALSE, ...) } \arguments{ -\item{x}{An object of class \link[brms:loo_compare.brmsfit]{brms::loo_compare}.} +\item{x}{An object of class \link[brms:loo_compare]{brms::loo_compare}.} \item{include_IC}{Whether to include the information criteria (IC).} diff --git a/man/report.estimate_contrasts.Rd b/man/report.estimate_contrasts.Rd index 2f442fa29..19ffc4473 100644 --- a/man/report.estimate_contrasts.Rd +++ b/man/report.estimate_contrasts.Rd @@ -27,7 +27,7 @@ An object of class \code{\link[=report]{report()}}. Create reports for \code{estimate_contrasts} objects. } \examples{ -\dontshow{if (all(insight::check_if_installed(c("modelbased", "marginaleffects", "collapse", "Formula"), quietly = TRUE))) withAutoprint(\{ # examplesIf} +\dontshow{if (all(insight::check_if_installed(c("modelbased", "marginaleffects", "collapse", "Formula")))) withAutoprint(\{ # examplesIf} library(modelbased) model <- lm(Sepal.Width ~ Species, data = iris) contr <- estimate_contrasts(model) From 1c1b755e82d72c00bb2a43cafa3b7d55a769c6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Th=C3=A9riault?= <13123390+rempsyc@users.noreply.github.com> Date: Tue, 9 Sep 2025 22:28:43 -0400 Subject: [PATCH 6/9] document [skip ci] --- man/report.compare.loo.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/report.compare.loo.Rd b/man/report.compare.loo.Rd index 7e715b70a..ae8395304 100644 --- a/man/report.compare.loo.Rd +++ b/man/report.compare.loo.Rd @@ -7,7 +7,7 @@ \method{report}{compare.loo}(x, include_IC = TRUE, include_ENP = FALSE, ...) } \arguments{ -\item{x}{An object of class \link[brms:loo_compare]{brms::loo_compare}.} +\item{x}{An object of class \link[brms:loo_compare.brmsfit]{brms::loo_compare}.} \item{include_IC}{Whether to include the information criteria (IC).} From dda0f568b5b654c4b28fb30cf4b21f579b93cd79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Th=C3=A9riault?= <13123390+rempsyc@users.noreply.github.com> Date: Tue, 9 Sep 2025 22:29:15 -0400 Subject: [PATCH 7/9] don't bump version [skip ci] --- DESCRIPTION | 2 +- NEWS.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0d2ee1638..97a52d4fc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: report Type: Package Title: Automated Reporting of Results and Statistical Models -Version: 0.6.1.4 +Version: 0.6.1.3 Authors@R: c(person(given = "Dominique", family = "Makowski", diff --git a/NEWS.md b/NEWS.md index 2acc3940a..b3726d1ae 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,6 @@ Bug fixes -* Fixed lint issues in `report.estimate_contrasts()` by addressing line length violations * Fixed a lot of linting issues across the package. * Fixed duplicated text output in `report()` for glmmTMB objects by addressing both regex pattern and redundant CI information concatenation in `report_info.lm()` (#481) * Fixed issue with missing effect size for the Intercept term in type 3 anova tables (#451) From 3789198ba27bdea6f2703382450eeebc83bcc155 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Sep 2025 02:50:57 +0000 Subject: [PATCH 8/9] Fix @examplesIf condition to prevent CI failures by restoring quietly=TRUE and using nolint strategy Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com> --- R/report.estimate_contrasts.R | 4 +++- man/report.compare.loo.Rd | 2 +- man/report.estimate_contrasts.Rd | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/R/report.estimate_contrasts.R b/R/report.estimate_contrasts.R index 59efb0009..786b1e264 100644 --- a/R/report.estimate_contrasts.R +++ b/R/report.estimate_contrasts.R @@ -9,7 +9,9 @@ #' #' @inherit report return seealso #' -#' @examplesIf all(insight::check_if_installed(c("modelbased", "marginaleffects", "collapse", "Formula"))) +# nolint start +#' @examplesIf all(insight::check_if_installed(c("modelbased", "marginaleffects", "collapse", "Formula"), quietly = TRUE)) +# nolint end #' library(modelbased) #' model <- lm(Sepal.Width ~ Species, data = iris) #' contr <- estimate_contrasts(model) diff --git a/man/report.compare.loo.Rd b/man/report.compare.loo.Rd index ae8395304..7e715b70a 100644 --- a/man/report.compare.loo.Rd +++ b/man/report.compare.loo.Rd @@ -7,7 +7,7 @@ \method{report}{compare.loo}(x, include_IC = TRUE, include_ENP = FALSE, ...) } \arguments{ -\item{x}{An object of class \link[brms:loo_compare.brmsfit]{brms::loo_compare}.} +\item{x}{An object of class \link[brms:loo_compare]{brms::loo_compare}.} \item{include_IC}{Whether to include the information criteria (IC).} diff --git a/man/report.estimate_contrasts.Rd b/man/report.estimate_contrasts.Rd index 19ffc4473..2f442fa29 100644 --- a/man/report.estimate_contrasts.Rd +++ b/man/report.estimate_contrasts.Rd @@ -27,7 +27,7 @@ An object of class \code{\link[=report]{report()}}. Create reports for \code{estimate_contrasts} objects. } \examples{ -\dontshow{if (all(insight::check_if_installed(c("modelbased", "marginaleffects", "collapse", "Formula")))) withAutoprint(\{ # examplesIf} +\dontshow{if (all(insight::check_if_installed(c("modelbased", "marginaleffects", "collapse", "Formula"), quietly = TRUE))) withAutoprint(\{ # examplesIf} library(modelbased) model <- lm(Sepal.Width ~ Species, data = iris) contr <- estimate_contrasts(model) From b6c8936a8316ffe7c4b6dab55f18853a3409863b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Th=C3=A9riault?= <13123390+rempsyc@users.noreply.github.com> Date: Tue, 9 Sep 2025 23:53:27 -0400 Subject: [PATCH 9/9] minor style [skip ci] --- .github/ISSUE_TEMPLATE/z_copilot-issue.yml | 4 ++-- man/report.compare.loo.Rd | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/z_copilot-issue.yml b/.github/ISSUE_TEMPLATE/z_copilot-issue.yml index f1d7083d6..02c616936 100644 --- a/.github/ISSUE_TEMPLATE/z_copilot-issue.yml +++ b/.github/ISSUE_TEMPLATE/z_copilot-issue.yml @@ -28,5 +28,5 @@ body: attributes: value: | **Setup preference guide:** - - **copilot-setup-full** (default label): For code changes, new features, function modifications, or tasks requiring complete R development environment. - - For documentation changes, minor fixes, configuration updates, or tasks that don't require full R environment (saves 5-10 minutes), remove the **copilot-setup-full** label before creating the issue. + - 🔴 **copilot-setup-full** (default label): For code changes, new features, function modifications, or tasks requiring complete R development environment. + - 🔵 For documentation changes, minor fixes, configuration updates, or tasks that don't require full R environment (saves 5-10 minutes), remove the **copilot-setup-full** label before creating the issue. diff --git a/man/report.compare.loo.Rd b/man/report.compare.loo.Rd index 7e715b70a..ae8395304 100644 --- a/man/report.compare.loo.Rd +++ b/man/report.compare.loo.Rd @@ -7,7 +7,7 @@ \method{report}{compare.loo}(x, include_IC = TRUE, include_ENP = FALSE, ...) } \arguments{ -\item{x}{An object of class \link[brms:loo_compare]{brms::loo_compare}.} +\item{x}{An object of class \link[brms:loo_compare.brmsfit]{brms::loo_compare}.} \item{include_IC}{Whether to include the information criteria (IC).}