Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/easystats/insight
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jan 30, 2023
2 parents 675aee8 + e2a506c commit 3705b2f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 14 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.18.8
Date: 2022-11-22 19:08:48 UTC
SHA: 005c7d2dbad8833ed8b56541e8417637c3228b81
Version: 0.19.0
Date: 2023-01-30 08:26:46 UTC
SHA: 3cce4c54135598d8559cb272e191ad96b35938e8
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: insight
Title: Easy Access to Model Information for Various Model Objects
Version: 0.18.8.14
Version: 0.19.0
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down
24 changes: 16 additions & 8 deletions R/utils_get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
# detect matrix columns ----------------------------------------------------

# check if we have any matrix columns, e.g. from splines
mc <- sapply(mf, is.matrix)
mc <- vapply(mf, is.matrix, TRUE)

# save original response value and the respective single variable names of
# the response for later. we don't want to change the response value,
Expand Down Expand Up @@ -223,15 +223,15 @@
mf <- stats::na.omit(mf)

# then set back attributes
mf <- as.data.frame(mapply(function(.d, .l) {
mf <- as.data.frame(Map(function(.d, .l) {
attr(.d, "labels") <- .l
.d
}, mf, value_labels, SIMPLIFY = FALSE), stringsAsFactors = FALSE)
}, mf, value_labels), stringsAsFactors = FALSE)

mf <- as.data.frame(mapply(function(.d, .l) {
mf <- as.data.frame(Map(function(.d, .l) {
attr(.d, "label") <- .l
.d
}, mf, variable_labels, SIMPLIFY = FALSE), stringsAsFactors = FALSE)
}, mf, variable_labels), stringsAsFactors = FALSE)
}
}

Expand Down Expand Up @@ -458,8 +458,16 @@
} else {
for (i in seq_along(interactions)) {
int <- interactions[i]
mf[[names(int)]] <- as.factor(substr(as.character(mf[[int]]), regexpr("\\.[^\\.]*$", as.character(mf[[int]])) + 1, nchar(as.character(mf[[int]]))))
mf[[int]] <- as.factor(substr(as.character(mf[[int]]), 0, regexpr("\\.[^\\.]*$", as.character(mf[[int]])) - 1))
mf[[names(int)]] <- as.factor(substr(
as.character(mf[[int]]),
regexpr("\\.[^\\.]*$", as.character(mf[[int]])) + 1,
nchar(as.character(mf[[int]]))
))
mf[[int]] <- as.factor(substr(
as.character(mf[[int]]),
0,
regexpr("\\.[^\\.]*$", as.character(mf[[int]])) - 1
))
}
if (isTRUE(verbose)) {
format_warning(
Expand Down Expand Up @@ -600,7 +608,7 @@

if (length(still_missing) && isTRUE(verbose)) {
format_warning(
sprintf("Following potential variables could not be found in the data: %s", paste0(still_missing, collapse = " ,"))
sprintf("Following potential variables could not be found in the data: %s", toString(still_missing))
)
}

Expand Down
9 changes: 8 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
This submission fixes issues with reverse-dependencies from a planned update of the *performance* package. The update of the *performance* package introduces breaking changes, which are anticipated in the fixes included in this release.
## revdepcheck results

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

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

We saw one error (failing example) for the *marginaleffects* package. This is expected, the maintainer is informed and has prepared an update of *marginaleffects*, which can be submitted once *insight* is accepted on CRAN.
1 change: 0 additions & 1 deletion tests/testthat/test-gam.R
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,4 @@ if (.runThisTest && requiet("mgcv") && requiet("httr")) {
p2 <- predict(mod, type = "response")
expect_equal(as.vector(p1), p2, ignore_attr = TRUE)
})

}

0 comments on commit 3705b2f

Please sign in to comment.