Skip to content

Commit 52903ed

Browse files
authored
Fix workflows (RcppEigen), badges (#461)
* accept snapshots, add RcppEigen and BH to suggests, run examples conditionally, remove status and lifecycle badges * add suppressWarnings to brms::loo_compare() example to avoid failing example workflow * quotes, quietly = TRUE * document * # nolint start for too long @exampleIf
1 parent fd068b3 commit 52903ed

File tree

6 files changed

+25
-31
lines changed

6 files changed

+25
-31
lines changed

DESCRIPTION

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Suggests:
7777
survival,
7878
modelbased,
7979
emmeans,
80+
RcppEigen,
81+
BH,
8082
testthat (>= 3.2.1)
8183
VignetteBuilder:
8284
knitr

R/report.compare.loo.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,22 @@
77
#' @param include_ENP Whether to include the effective number of parameters (ENP).
88
#' @param ... Additional arguments (not used for now).
99
#'
10-
#' @examplesIf require("brms", quietly = TRUE)
10+
# nolint start
11+
#' @examplesIf requireNamespace("brms", quietly = TRUE) && requireNamespace("RcppEigen", quietly = TRUE) && requireNamespace("BH", quietly = TRUE)
12+
# nolint end
1113
#' \donttest{
1214
#' library(brms)
1315
#'
1416
#' m1 <- brms::brm(mpg ~ qsec, data = mtcars)
1517
#' m2 <- brms::brm(mpg ~ qsec + drat, data = mtcars)
1618
#' m3 <- brms::brm(mpg ~ qsec + drat + wt, data = mtcars)
1719
#'
18-
#' x <- brms::loo_compare(
20+
#' x <- suppressWarnings(brms::loo_compare(
1921
#' brms::add_criterion(m1, "loo"),
2022
#' brms::add_criterion(m2, "loo"),
2123
#' brms::add_criterion(m3, "loo"),
2224
#' model_names = c("m1", "m2", "m3")
23-
#' )
25+
#' ))
2426
#' report(x)
2527
#' report(x, include_IC = FALSE)
2628
#' report(x, include_ENP = TRUE)

README.Rmd

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ library(report)
2929
[![r-universe](https://easystats.r-universe.dev/badges/report)](https://easystats.r-universe.dev/report)
3030
[![downloads](http://cranlogs.r-pkg.org/badges/report)](https://cran.r-project.org/package=report)
3131
[![total](https://cranlogs.r-pkg.org/badges/grand-total/report)](https://cranlogs.r-pkg.org/)
32-
[![status](https://tinyverse.netlify.com/badge/report)](https://CRAN.R-project.org/package=report)
33-
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
3432
[![stars](https://img.shields.io/github/stars/easystats/report?style=social)](https://github.com/easystats/report/stargazers)
3533

3634
***"From R to your manuscript"***

README.md

+14-22
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
[![r-universe](https://easystats.r-universe.dev/badges/report)](https://easystats.r-universe.dev/report)
77
[![downloads](http://cranlogs.r-pkg.org/badges/report)](https://cran.r-project.org/package=report)
88
[![total](https://cranlogs.r-pkg.org/badges/grand-total/report)](https://cranlogs.r-pkg.org/)
9-
[![status](https://tinyverse.netlify.com/badge/report)](https://CRAN.R-project.org/package=report)
10-
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
119
[![stars](https://img.shields.io/github/stars/easystats/report?style=social)](https://github.com/easystats/report/stargazers)
1210

1311
***“From R to your manuscript”***
@@ -262,18 +260,18 @@ report(model)
262260
# of 1000 iterations and a warmup of 500) to predict mpg with qsec and wt
263261
# (formula: mpg ~ qsec + wt). Priors over parameters were all set as normal (mean
264262
# = 0.00, SD = 8.43; mean = 0.00, SD = 15.40) distributions. The model's
265-
# explanatory power is substantial (R2 = 0.81, 95% CI [0.70, 0.90], adj. R2 =
266-
# 0.79). The model's intercept, corresponding to qsec = 0 and wt = 0, is at 19.80
267-
# (95% CI [8.93, 29.80]). Within this model:
263+
# explanatory power is substantial (R2 = 0.81, 95% CI [0.71, 0.90], adj. R2 =
264+
# 0.79). The model's intercept, corresponding to qsec = 0 and wt = 0, is at 19.67
265+
# (95% CI [8.34, 30.67]). Within this model:
268266
#
269-
# - The effect of qsec (Median = 0.93, 95% CI [0.40, 1.49]) has a 100.00%
270-
# probability of being positive (> 0), 99.05% of being significant (> 0.30), and
271-
# 0.25% of being large (> 1.81). The estimation successfully converged (Rhat =
272-
# 1.000) and the indices are reliable (ESS = 1864)
273-
# - The effect of wt (Median = -5.04, 95% CI [-5.99, -4.08]) has a 100.00%
267+
# - The effect of qsec (Median = 0.93, 95% CI [0.39, 1.51]) has a 99.90%
268+
# probability of being positive (> 0), 98.65% of being significant (> 0.30), and
269+
# 0.30% of being large (> 1.81). The estimation successfully converged (Rhat =
270+
# 1.000) and the indices are reliable (ESS = 1762)
271+
# - The effect of wt (Median = -5.05, 95% CI [-6.01, -4.05]) has a 100.00%
274272
# probability of being negative (< 0), 100.00% of being significant (< -0.30),
275273
# and 100.00% of being large (< -1.81). The estimation successfully converged
276-
# (Rhat = 0.999) and the indices are reliable (ESS = 2424)
274+
# (Rhat = 1.000) and the indices are reliable (ESS = 2213)
277275
#
278276
# Following the Sequential Effect eXistence and sIgnificance Testing (SEXIT)
279277
# framework, we report the median of the posterior distribution and its 95% CI
@@ -296,16 +294,10 @@ model <- lm(Sepal.Length ~ Species, data = iris)
296294

297295
report_model(model)
298296
# linear model (estimated using OLS) to predict Sepal.Length with Species (formula: Sepal.Length ~ Species)
299-
```
300-
301-
``` r
302297

303298
report_performance(model)
304299
# The model explains a statistically significant and substantial proportion of
305300
# variance (R2 = 0.62, F(2, 147) = 119.26, p < .001, adj. R2 = 0.61)
306-
```
307-
308-
``` r
309301

310302
report_statistics(model)
311303
# beta = 5.01, 95% CI [4.86, 5.15], t(147) = 68.76, p < .001; Std. beta = -1.01, 95% CI [-1.18, -0.84]
@@ -359,11 +351,11 @@ analysis paragraph about the tools used.
359351
report(sessionInfo())
360352
```
361353

362-
# Analyses were conducted using the R Statistical language (version 4.4.0; R Core
354+
# Analyses were conducted using the R Statistical language (version 4.4.1; R Core
363355
# Team, 2024) on Windows 11 x64 (build 22631), using the packages lme4 (version
364-
# 1.1.35.3; Bates D et al., 2015), Matrix (version 1.7.0; Bates D et al., 2024),
365-
# Rcpp (version 1.0.12; Eddelbuettel D et al., 2024), rstanarm (version 2.32.1;
366-
# Goodrich B et al., 2024), report (version 0.5.8.3; Makowski D et al., 2023) and
356+
# 1.1.35.5; Bates D et al., 2015), Matrix (version 1.7.0; Bates D et al., 2024),
357+
# Rcpp (version 1.0.13; Eddelbuettel D et al., 2024), rstanarm (version 2.32.1;
358+
# Goodrich B et al., 2024), report (version 0.5.9; Makowski D et al., 2023) and
367359
# dplyr (version 1.1.4; Wickham H et al., 2023).
368360
#
369361
# References
@@ -376,7 +368,7 @@ report(sessionInfo())
376368
# <https://CRAN.R-project.org/package=Matrix>.
377369
# - Eddelbuettel D, Francois R, Allaire J, Ushey K, Kou Q, Russell N, Ucar I,
378370
# Bates D, Chambers J (2024). _Rcpp: Seamless R and C++ Integration_. R package
379-
# version 1.0.12, <https://CRAN.R-project.org/package=Rcpp>. Eddelbuettel D,
371+
# version 1.0.13, <https://CRAN.R-project.org/package=Rcpp>. Eddelbuettel D,
380372
# François R (2011). "Rcpp: Seamless R and C++ Integration." _Journal of
381373
# Statistical Software_, *40*(8), 1-18. doi:10.18637/jss.v040.i08
382374
# <https://doi.org/10.18637/jss.v040.i08>. Eddelbuettel D (2013). _Seamless R and

man/report.compare.loo.Rd

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/_snaps/windows/report_performance.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
Code
3333
summary(report_performance(x7))
3434
Output
35-
[1] "The model's explanatory power is substantial (R2 = 0.83, adj. R2 = 0.83) and the part related to the fixed effects alone (marginal R2) is of 0.95"
35+
[1] "The model's explanatory power is substantial (R2 = 0.83, adj. R2 = 0.83) and the part related to the fixed effects alone (marginal R2) is of 0.74"
3636

0 commit comments

Comments
 (0)