Skip to content

Commit 4e1f782

Browse files
authored
Prepare CRAN release (#1074)
* Prepare CRAN release * fix * add test * add test
1 parent 798e3fa commit 4e1f782

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: insight
33
Title: Easy Access to Model Information for Various Model Objects
4-
Version: 1.2.0.11
4+
Version: 1.3.0
55
Authors@R:
66
c(person(given = "Daniel",
77
family = "Lüdecke",
@@ -148,7 +148,7 @@ Suggests:
148148
lmtest,
149149
logistf,
150150
logitr,
151-
marginaleffects (>= 0.25.0),
151+
marginaleffects (>= 0.26.0),
152152
MASS,
153153
Matrix,
154154
mclogit,
@@ -221,4 +221,3 @@ Config/testthat/edition: 3
221221
Config/testthat/parallel: true
222222
Config/Needs/website: easystats/easystatstemplate
223223
Config/Needs/check: stan-dev/cmdstanr
224-
Remotes: vincentarelbundock/marginaleffects

NEWS.md

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

33
## Breaking Changes
44

R/find_formula.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ formula_ok <- function(x,
164164
#' @rdname find_formula
165165
#' @export
166166
find_formula.default <- function(x, verbose = TRUE, ...) {
167-
f <- .safe(list(conditional = .dot_formula(stats::formula(x), x, ...)))
167+
f <- .safe(list(conditional = stats::formula(x)))
168+
# if evaluation succeeds, we check in a next steps if dots are used
169+
if (!is.null(f)) {
170+
f$conditional <- .dot_formula(f$conditional, x, ...)
171+
}
168172
.find_formula_return(f, verbose = verbose)
169173
}
170174

tests/testthat/test-htest.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ test_that("get_data.t-test", {
1515
)
1616
})
1717

18+
test_that("find_formula.t-test", {
19+
x <- t.test(mpg ~ vs, data = mtcars)
20+
expect_null(find_formula(x))
21+
expect_silent(find_formula(x))
22+
})
23+
1824
test_that("model_info.t-test", {
1925
expect_true(model_info(x)$is_ttest)
2026
})
@@ -35,6 +41,7 @@ test_that("get_data.t-test, one-sample", {
3541
expect_identical(nrow(get_data(tt2)), 32L)
3642
expect_true(model_info(tt1)$is_ttest)
3743
expect_true(model_info(tt2)$is_ttest)
44+
expect_silent(get_data(tt1))
3845
})
3946

4047
# Two sample

0 commit comments

Comments
 (0)