Skip to content

Commit a81430d

Browse files
authored
Make sure performance works with datawizard 0.10.0 (#755)
1 parent c184e24 commit a81430d

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: performance
33
Title: Assessment of Regression Models Performance
4-
Version: 0.12.1
4+
Version: 0.12.1.1
55
Authors@R:
66
c(person(given = "Daniel",
77
family = "Lüdecke",

R/check_heterogeneity_bias.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,20 @@
2323
#' Modeling of Time-Series Cross-Sectional and Panel Data. Political Science
2424
#' Research and Methods, 3(1), 133–153.
2525
#'
26-
#' @examples
26+
#' @examplesIf insight::check_if_installed("datawizard", minimum_version = "0.12.0", quietly = TRUE)
2727
#' data(iris)
2828
#' iris$ID <- sample(1:4, nrow(iris), replace = TRUE) # fake-ID
2929
#' check_heterogeneity_bias(iris, select = c("Sepal.Length", "Petal.Length"), by = "ID")
3030
#' @export
3131
check_heterogeneity_bias <- function(x, select = NULL, by = NULL, group = NULL) {
32+
insight::check_if_installed("datawizard", minimum_version = "0.12.0")
33+
3234
## TODO: deprecate later
3335
if (!is.null(group)) {
3436
insight::format_warning("Argument `group` is deprecated and will be removed in a future release. Please use `by` instead.") # nolint
3537
by <- group
3638
}
39+
3740
if (insight::is_model(x)) {
3841
by <- insight::find_random(x, split_nested = TRUE, flatten = TRUE)
3942
if (is.null(by)) {

man/check_heterogeneity_bias.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-check_heterogeneity_bias.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test_that("check_heterogeneity_bias", {
2+
skip_if_not_installed("datawizard", minimum_version = "0.12.0")
23
data(iris)
34
set.seed(123)
45
iris$ID <- sample.int(4, nrow(iris), replace = TRUE) # fake-ID

0 commit comments

Comments
 (0)