Skip to content

Commit 19b0df4

Browse files
authored
Prepare CRAN release (#560)
* Prepare CRAN release * styler, remove remotes * styler
1 parent 9498360 commit 19b0df4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+84
-82
lines changed

DESCRIPTION

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: modelbased
33
Title: Estimation of Model-Based Predictions, Contrasts and Means
4-
Version: 0.12.0.22
4+
Version: 0.13.0
55
Authors@R:
66
c(person(given = "Dominique",
77
family = "Makowski",
@@ -39,10 +39,10 @@ BugReports: https://github.com/easystats/modelbased/issues
3939
Depends:
4040
R (>= 3.6)
4141
Imports:
42-
bayestestR (>= 0.16.1),
42+
bayestestR (>= 0.17.0),
4343
datawizard (>= 1.2.0),
44-
insight (>= 1.3.1),
45-
parameters (>= 0.27.0),
44+
insight (>= 1.4.1),
45+
parameters (>= 0.28.1),
4646
graphics,
4747
stats,
4848
tools,
@@ -76,7 +76,7 @@ Suggests:
7676
logspline,
7777
MASS,
7878
Matrix,
79-
marginaleffects (>= 0.26.0),
79+
marginaleffects (>= 0.29.0),
8080
mice,
8181
mgcv,
8282
mvtnorm,
@@ -115,4 +115,3 @@ Roxygen: list(markdown = TRUE)
115115
Config/Needs/check: stan-dev/cmdstanr
116116
Config/Needs/website: easystats/easystatstemplate
117117
LazyData: true
118-
Remotes: easystats/insight, easystats/parameters, easystats/bayestestR, vincentarelbundock/marginaleffects

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# modelbased (devel)
1+
# modelbased 0.13.0
22

33
## Changes
44

R/format.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ format.marginaleffects_contrasts <- function(x, model = NULL, p_adjust = NULL, c
684684
params <- data.frame(datawizard::data_restoretype(params, model_data))
685685

686686
# add posterior draws?
687-
insight::check_if_installed("marginaleffects", minimum_version = "0.28.0.22")
687+
insight::check_if_installed("marginaleffects", minimum_version = "0.29.0")
688688
posterior_draws <- suppressWarnings(as.data.frame(marginaleffects::get_draws(
689689
x,
690690
shape = "PxD"

R/get_marginalcontrasts.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ get_marginalcontrasts <- function(
1515
...
1616
) {
1717
# check if available
18-
insight::check_if_installed("marginaleffects", minimum_version = "0.25.0")
18+
insight::check_if_installed("marginaleffects", minimum_version = "0.29.0")
1919

2020
# temporarily overwrite settings that error on "too many" rows
2121
me_option <- getOption("marginaleffects_safe")

R/get_marginaleffects_type.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122

123123
# check if marginaleffects objects has posterior draws and thus is Bayesian
124124
.is_bayesian_marginaleffects <- function(model) {
125-
insight::check_if_installed("marginaleffects", minimum_version = "0.28.0.22")
125+
insight::check_if_installed("marginaleffects", minimum_version = "0.29.0")
126126
!is.null(suppressWarnings(marginaleffects::get_draws(model, "PxD")))
127127
}
128128

R/get_marginalmeans.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ get_marginalmeans <- function(model,
3131
verbose = TRUE,
3232
...) {
3333
# check if available
34-
insight::check_if_installed("marginaleffects")
34+
insight::check_if_installed("marginaleffects", minimum_version = "0.29.0")
3535

3636
# First step: process arguments --------------------------------------------
3737
# --------------------------------------------------------------------------

R/get_marginaltrends.R

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,21 @@
77
#' get_marginaltrends(model, trend = "Petal.Length", by = "Petal.Length")
88
#' get_marginaltrends(model, trend = "Petal.Length", by = c("Species", "Petal.Length"))
99
#' @export
10-
get_marginaltrends <- function(model,
11-
trend = NULL,
12-
by = NULL,
13-
predict = NULL,
14-
ci = 0.95,
15-
estimate = NULL,
16-
transform = NULL,
17-
p_adjust = "none",
18-
keep_iterations = FALSE,
19-
verbose = TRUE,
20-
...) {
10+
get_marginaltrends <- function(
11+
model,
12+
trend = NULL,
13+
by = NULL,
14+
predict = NULL,
15+
ci = 0.95,
16+
estimate = NULL,
17+
transform = NULL,
18+
p_adjust = "none",
19+
keep_iterations = FALSE,
20+
verbose = TRUE,
21+
...
22+
) {
2123
# check if available
22-
insight::check_if_installed("marginaleffects")
24+
insight::check_if_installed("marginaleffects", minimum_version = "0.29.0")
2325
dots <- list(...)
2426

2527
# set defaults
@@ -107,12 +109,7 @@ get_marginaltrends <- function(model,
107109

108110
# setup arguments again
109111
fun_args <- insight::compact_list(c(
110-
list(
111-
model,
112-
variables = myargs$trend,
113-
by = myargs$by,
114-
conf_level = ci
115-
),
112+
list(model, variables = myargs$trend, by = myargs$by, conf_level = ci),
116113
dots
117114
))
118115

@@ -124,6 +121,7 @@ get_marginaltrends <- function(model,
124121
fun_args$newdata <- datagrid
125122
}
126123

124+
# fmt: skip
127125
# handle distributional parameters
128126
if (!is.null(predict) && inherits(model, "brmsfit") && predict %in% .brms_aux_elements(model)) {
129127
fun_args$dpar <- predict

R/p_adjust.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158

159159
int <- paste0(pred, ":", mod)
160160
if (inherits(x, c("marginaleffects_slopes", "slopes", "marginaleffects"))) {
161-
insight::check_if_installed("marginaleffects", minimum_version = "0.28.0.22")
161+
insight::check_if_installed("marginaleffects", minimum_version = "0.29.0")
162162
model <- marginaleffects::components(x, "model")
163163
} else {
164164
model <- attributes(x)$model

tests/testthat/test-attributes_estimatefun.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
skip_if_not_installed("emmeans")
2-
skip_if_not_installed("marginaleffects", minimum_version = "0.28.0.22")
2+
skip_if_not_installed("marginaleffects", minimum_version = "0.29.0")
33

44
test_that("attributes_means", {
55
data(iris)

tests/testthat/test-backtransform_invlink.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
skip_on_cran()
2-
skip_if_not_installed("marginaleffects", minimum_version = "0.28.0.22")
2+
skip_if_not_installed("marginaleffects", minimum_version = "0.29.0")
33
skip_if_not_installed("glmmTMB")
44

55
test_that("estimate_means correct inverse link for glmmTMB", {

0 commit comments

Comments
 (0)