-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into joss-paper-draft
- Loading branch information
Showing
56 changed files
with
1,397 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Run tests in random order | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: check-random-test-order | ||
|
||
jobs: | ||
check-random-test-order: | ||
uses: easystats/workflows/.github/workflows/check-random-test-order.yaml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Type: Package | ||
Package: report | ||
Title: Automated Reporting of Results and Statistical Models | ||
Version: 0.5.6 | ||
Version: 0.5.7.10 | ||
Authors@R: | ||
c(person(given = "Dominique", | ||
family = "Makowski", | ||
|
@@ -37,7 +37,12 @@ Authors@R: | |
family = "Siegel", | ||
role = "ctb", | ||
email = "[email protected]", | ||
comment = c(ORCID = "0000-0002-6021-804X"))) | ||
comment = c(ORCID = "0000-0002-6021-804X")), | ||
person(given = "Camden", | ||
family = "Bock", | ||
role = "ctb", | ||
email = "[email protected]", | ||
comment = c(ORCID = "0000-0002-3907-7748"))) | ||
Maintainer: Rémi Thériault <[email protected]> | ||
Description: The aim of the 'report' package is to bridge the gap between | ||
R’s output and the formatted results contained in your manuscript. | ||
|
@@ -52,10 +57,10 @@ Depends: | |
Imports: | ||
bayestestR (>= 0.13.0), | ||
effectsize (> 0.8.2), | ||
insight (>= 0.18.8), | ||
parameters (>= 0.20.0), | ||
performance (>= 0.9.2), | ||
datawizard (>= 0.6.5), | ||
insight (>= 0.19.1), | ||
parameters (>= 0.20.2), | ||
performance (>= 0.10.2), | ||
datawizard (>= 0.7.0), | ||
stats, | ||
tools, | ||
utils | ||
|
@@ -69,12 +74,14 @@ Suggests: | |
rmarkdown, | ||
rstanarm, | ||
survival, | ||
modelbased, | ||
emmeans, | ||
testthat | ||
VignetteBuilder: | ||
knitr | ||
Encoding: UTF-8 | ||
Language: en-US | ||
RoxygenNote: 7.2.3.9000 | ||
RoxygenNote: 7.2.3 | ||
Config/testthat/edition: 3 | ||
Config/Needs/website: | ||
rstudio/bslib, | ||
|
@@ -86,6 +93,7 @@ Collate: | |
'format_citation.R' | ||
'format_formula.R' | ||
'format_model.R' | ||
'reexports.R' | ||
'report-package.R' | ||
'utils_combine_tables.R' | ||
'report.lm.R' | ||
|
@@ -102,6 +110,7 @@ Collate: | |
'report.compare_performance.R' | ||
'report.data.frame.R' | ||
'report.default.R' | ||
'report.estimate_contrasts.R' | ||
'report.factor.R' | ||
'report.glm.R' | ||
'report.glmmTMB.R' | ||
|
@@ -134,3 +143,4 @@ Collate: | |
'utils_grouped_df.R' | ||
'zzz.R' | ||
Roxygen: list(markdown = TRUE) | ||
Remotes: easystats/insight |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# ----------------------- insight ------------------------------------- | ||
|
||
#' @importFrom insight print_html | ||
#' @export | ||
insight::print_html | ||
|
||
#' @importFrom insight print_md | ||
#' @export | ||
insight::print_md | ||
|
||
#' @importFrom insight display | ||
#' @export | ||
insight::display |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#' Reporting `estimate_contrasts` objects | ||
#' | ||
#' Create reports for `estimate_contrasts` objects. | ||
#' | ||
#' @param x Object of class `estimate_contrasts`. | ||
#' @param table Provide the output of `report_table()` to avoid its | ||
#' re-computation. | ||
#' @inheritParams report | ||
#' | ||
#' @inherit report return seealso | ||
#' | ||
#' @examplesIf requireNamespace("modelbased", quietly = TRUE) && requireNamespace("emmeans", quietly = TRUE) | ||
#' library(modelbased) | ||
#' model <- lm(Sepal.Width ~ Species, data = iris) | ||
#' contr <- estimate_contrasts(model) | ||
#' report(contr) | ||
#' @return An object of class [report()]. | ||
#' @export | ||
report.estimate_contrasts <- function(x, ...) { | ||
table <- report_table(x, ...) | ||
text <- report_text(x, table = table, ...) | ||
|
||
as.report(text, table = table, ...) | ||
} | ||
|
||
# report_table ------------------------------------------------------------ | ||
|
||
#' @rdname report.estimate_contrasts | ||
#' @export | ||
report_table.estimate_contrasts <- function(x, ...) { | ||
as.report_table(x) | ||
} | ||
|
||
# report_text ------------------------------------------------------------ | ||
|
||
#' @rdname report.estimate_contrasts | ||
#' @export | ||
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 ", | ||
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), ")", | ||
collapse = ". " | ||
) | ||
|
||
text <- paste("The marginal contrasts analysis suggests the following.", paste0(text, collapse = "")) | ||
|
||
as.report_text(text) | ||
} |
Oops, something went wrong.