diff --git a/.github/ISSUE_TEMPLATE/z_copilot-issue.yml b/.github/ISSUE_TEMPLATE/z_copilot-issue.yml index f1d7083d..02c61693 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/R/report.estimate_contrasts.R b/R/report.estimate_contrasts.R index 86a1edb5..786b1e26 100644 --- a/R/report.estimate_contrasts.R +++ b/R/report.estimate_contrasts.R @@ -9,7 +9,9 @@ #' #' @inherit report return seealso #' +# 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) @@ -17,10 +19,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 ------------------------------------------------------------ @@ -38,7 +40,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`, ", ", @@ -46,7 +48,10 @@ 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) }