Skip to content

Commit

Permalink
CRAN submission RC 0.13.1 (#593)
Browse files Browse the repository at this point in the history
* CRAN submission RC 0.13.1

* lintr

* revdep-results

* bump datawizard as well

* skip on lin/mac, increase tolerance

* update wordlist

* bump see

* add tolerance for emmGrid tests

* check for internet access

cf. easystats/easystats#362

* Remove unnecessary re-export

easystats/easystats#292

* format_error

* fix lintr

* renamed

* rename back, dev version now

* skip on cran

* run tests in parallel

* shorten example to avoid yet another note

* Update bayesfactor_restricted.Rd

---------

Co-authored-by: Indrajeet Patil <[email protected]>
Co-authored-by: Dominique Makowski <[email protected]>
  • Loading branch information
3 people authored Apr 7, 2023
1 parent db2548d commit 035da1e
Show file tree
Hide file tree
Showing 20 changed files with 165 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ linters: linters_with_defaults(
object_usage_linter = NULL,
todo_comment_linter = NULL,
undesirable_function_linter(c("mapply" = NA, "sapply" = NA, "setwd" = NA)),
undesirable_operator_linter = NULL,
unnecessary_concatenation_linter(allow_single_expression = FALSE),
undesirable_operator_linter = NULL,
defaults = linters_with_tags(tags = NULL)
)
9 changes: 6 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: bayestestR
Title: Understand and Describe Bayesian Models and Posterior Distributions
Version: 0.13.0.10
Version: 0.13.1
Authors@R:
c(person(given = "Dominique",
family = "Makowski",
Expand Down Expand Up @@ -67,7 +67,7 @@ Depends:
R (>= 3.6)
Imports:
insight (>= 0.19.1),
datawizard (>= 0.6.5),
datawizard (>= 0.7.0),
graphics,
methods,
stats,
Expand All @@ -80,6 +80,7 @@ Suggests:
blavaan,
bridgesampling,
brms,
curl,
effectsize,
emmeans,
gamm4,
Expand All @@ -105,7 +106,7 @@ Suggests:
rmarkdown,
rstan,
rstanarm,
see (>= 0.7.4),
see (>= 0.7.5),
testthat,
tweedie
License: GPL-3
Expand All @@ -118,6 +119,8 @@ Language: en-US
RoxygenNote: 7.2.3.9000
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
Config/testthat/parallel: true
Config/rcmdcheck/ignore-inconsequential-notes: true
Config/Needs/website:
rstudio/bslib,
r-lib/pkgdown,
Expand Down
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,6 @@ export(pd_to_p)
export(point_estimate)
export(print_html)
export(print_md)
export(reshape_ci)
export(reshape_draws)
export(reshape_iterations)
export(rnorm_perfect)
Expand All @@ -640,6 +639,5 @@ export(simulate_ttest)
export(spi)
export(unupdate)
export(weighted_posteriors)
importFrom(datawizard,reshape_ci)
importFrom(insight,print_html)
importFrom(insight,print_md)
12 changes: 6 additions & 6 deletions R/bayesfactor_restricted.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
#' set.seed(444)
#' library(bayestestR)
#' prior <- data.frame(
#' A = rnorm(1000),
#' B = rnorm(1000),
#' C = rnorm(1000)
#' A = rnorm(500),
#' B = rnorm(500),
#' C = rnorm(500)
#' )
#'
#' posterior <- data.frame(
#' A = rnorm(1000, .4, 0.7),
#' B = rnorm(1000, -.2, 0.4),
#' C = rnorm(1000, 0, 0.5)
#' A = rnorm(500, .4, 0.7),
#' B = rnorm(500, -.2, 0.4),
#' C = rnorm(500, 0, 0.5)
#' )
#'
#' hyps <- c(
Expand Down
2 changes: 1 addition & 1 deletion R/mediation.R
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ print.bayestestR_mediation <- function(x, digits = 3, ...) {
cat(insight::export_table(x, digits = digits))
cat("\n")

prop_mediated[] <- lapply(prop_mediated, function(i) insight::format_value(i, as_percent = TRUE))
prop_mediated[] <- lapply(prop_mediated, insight::format_value, as_percent = TRUE)
insight::print_color(
sprintf(
"Proportion mediated: %s [%s, %s]\n",
Expand Down
6 changes: 3 additions & 3 deletions R/p_to_bf.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ p_to_bf.numeric <- function(x, log = FALSE, n_obs = NULL, ...) {
p <- x
# Validate n_obs
if (is.null(n_obs)) {
stop("Argument `n_obs` must be specified.", call. = FALSE)
insight::format_error("Argument `n_obs` must be specified.")
} else if (length(n_obs) == 1L) {
n_obs <- rep(n_obs, times = length(p))
} else if (length(n_obs) != length(p)) {
stop("`n_obs` must be of length 1 or same length as `p`.", call. = FALSE)
insight::format_error("`n_obs` must be of length 1 or same length as `p`.")
}

# Convert
Expand Down Expand Up @@ -112,7 +112,7 @@ p_to_bf.default <- function(x, log = FALSE, ...) {
n_obs <- list(...)$n_obs
}
} else {
stop("Argument `x` must be a model object, or a numeric vector of p-values.", call. = FALSE)
insight::format_error("Argument `x` must be a model object, or a numeric vector of p-values.")
}

out <- p_to_bf(p, n_obs = n_obs, log = log)
Expand Down
3 changes: 0 additions & 3 deletions R/reexports.R

This file was deleted.

8 changes: 3 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ describe_posterior(
centrality = "all"
)
```
```{r message=FALSE, warning=FALSE,echo=FALSE}

```{r message=FALSE, warning=FALSE, echo=FALSE, eval=curl::has_internet()}
model <- insight::download_model("brms_zi_3")
describe_posterior(
model,
Expand All @@ -158,10 +159,7 @@ describe_posterior(
```


*bayestestR* also includes [**many other features**](https://easystats.github.io/bayestestR/reference/index.html) useful for your Bayesian analsyes. Here are some more examples:



*bayestestR* also includes [**many other features**](https://easystats.github.io/bayestestR/reference/index.html) useful for your Bayesian analyses. Here are some more examples:

## Point-estimates

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ describe_posterior(
)
## Summary of Posterior Distribution
##
## Parameter | Median | 95% CI | pd | ps
## -----------------------------------------------------
## Posterior | -8.68e-03 | [-1.96, 1.92] | 50.35% | 0.46
## Parameter | Median | 95% CI | pd | ps
## --------------------------------------------------
## Posterior | 0.01 | [-1.97, 1.99] | 50.58% | 0.47
```

`describe_posterior()` works for many objects, including more complex
Expand Down Expand Up @@ -239,7 +239,7 @@ describe_posterior(

*bayestestR* also includes [**many other
features**](https://easystats.github.io/bayestestR/reference/index.html)
useful for your Bayesian analsyes. Here are some more examples:
useful for your Bayesian analyses. Here are some more examples:

## Point-estimates

Expand Down
23 changes: 8 additions & 15 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
## Test environments

* local Windows install, R 4.1.2

* ubuntu 18.04 (on gitub-actions-ci), R 4.1.2

* win-builder (devel and release)

## R CMD check results

0 errors | 0 warnings | 0 note


## revdepcheck results

We checked 18 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
We checked 22 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
* We failed to check 1 packages

Issues with CRAN packages are summarised below.

### Failed to check

* snSMART (NA)
Reason: JAGS was not installed.
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Littman
Liu
Lodewyckx
Ly
Makowski
MCMCglmm
MCSE
MPE
Expand Down
12 changes: 6 additions & 6 deletions man/bayesfactor_restricted.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions man/reexports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 23 additions & 17 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
# Platform

|field |value |
|:--------|:------------------------------------------|
|version |R version 4.1.1 (2021-08-10) |
|os |Windows 10 x64 (build 19043) |
|system |x86_64, mingw32 |
|ui |RStudio |
|language |(EN) |
|collate |English_United Kingdom.1252 |
|ctype |English_United Kingdom.1252 |
|tz |Europe/Berlin |
|date |2021-10-29 |
|rstudio |1.4.1717 Juliet Rose (desktop) |
|pandoc |2.15 @ C:/PROGRA~1/Pandoc/ (via rmarkdown) |
|field |value |
|:--------|:----------------------------------------|
|version |R version 4.2.3 (2023-03-15 ucrt) |
|os |Windows 10 x64 (build 19045) |
|system |x86_64, mingw32 |
|ui |RStudio |
|language |(EN) |
|collate |German_Germany.utf8 |
|ctype |German_Germany.utf8 |
|tz |Europe/Berlin |
|date |2023-03-21 |
|rstudio |2022.12.0+353 Elsbeth Geranium (desktop) |
|pandoc |NA |

# Dependencies

|package |old |new |<U+0394> |
|package |old |new |Δ |
|:----------|:------|:------|:--|
|bayestestR |0.11.0 |0.11.5 |* |
|datawizard |0.2.1 |0.2.1 | |
|insight |0.14.5 |0.14.5 | |
|bayestestR |0.13.0 |0.13.1 |* |
|datawizard |0.6.5 |0.6.5 | |
|insight |0.19.1 |0.19.1 | |

# Revdeps

## Failed to check (1)

|package |version |error |warning |note |
|:-------|:-------|:-----|:-------|:----|
|snSMART |0.2.2 |1 | | |

9 changes: 7 additions & 2 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
## revdepcheck results

We checked 18 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
We checked 22 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
* We failed to check 1 packages

Issues with CRAN packages are summarised below.

### Failed to check

* snSMART (NA)
Binary file modified revdep/data.sqlite
Binary file not shown.
71 changes: 70 additions & 1 deletion revdep/failures.md
Original file line number Diff line number Diff line change
@@ -1 +1,70 @@
*Wow, no problems at all. :)*
# snSMART

<details>

* Version: 0.2.2
* GitHub: https://github.com/sidiwang/snSMART
* Source code: https://github.com/cran/snSMART
* Date/Publication: 2022-11-16 15:00:11 UTC
* Number of recursive dependencies: 55

Run `revdep_details(, "snSMART")` for more info

</details>

## In both

* checking whether package 'snSMART' can be installed ... ERROR
```
Installation failed.
See 'D:/mail/Documents/Coding/R/easystats/bayestestR/revdep/checks/snSMART/new/snSMART.Rcheck/00install.out' for details.
```

## Installation

### Devel

```
* installing *source* package 'snSMART' ...
** package 'snSMART' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error: .onLoad failed in loadNamespace() for 'rjags', details:
call: fun(libname, pkgname)
error: Failed to locate any version of JAGS version 4
The rjags package is just an interface to the JAGS library
Make sure you have installed JAGS-4.x.y.exe (for any x >=0, y>=0) from
http://www.sourceforge.net/projects/mcmc-jags/files
Execution halted
ERROR: lazy loading failed for package 'snSMART'
* removing 'D:/mail/Documents/Coding/R/easystats/bayestestR/revdep/checks/snSMART/new/snSMART.Rcheck/snSMART'
```
### CRAN

```
* installing *source* package 'snSMART' ...
** package 'snSMART' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error: .onLoad failed in loadNamespace() for 'rjags', details:
call: fun(libname, pkgname)
error: Failed to locate any version of JAGS version 4
The rjags package is just an interface to the JAGS library
Make sure you have installed JAGS-4.x.y.exe (for any x >=0, y>=0) from
http://www.sourceforge.net/projects/mcmc-jags/files
Execution halted
ERROR: lazy loading failed for package 'snSMART'
* removing 'D:/mail/Documents/Coding/R/easystats/bayestestR/revdep/checks/snSMART/old/snSMART.Rcheck/snSMART'
```
Loading

0 comments on commit 035da1e

Please sign in to comment.