diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 167146dfe..abb3c037a 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 0.12.0 -Date: 2024-06-07 17:11:44 UTC -SHA: cb1c46609c8f943a736f3c76b5cadd4272e7bdf2 +Version: 0.12.2 +Date: 2024-07-17 21:02:38 UTC +SHA: d4c45126ca666644785dc64d2af6b87eee9ca39b diff --git a/DESCRIPTION b/DESCRIPTION index 1b711cb64..aa64c172c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: performance Title: Assessment of Regression Models Performance -Version: 0.12.0.13 +Version: 0.12.2 Authors@R: c(person(given = "Daniel", family = "Lüdecke", diff --git a/NEWS.md b/NEWS.md index 3fca779e1..cb9cc26bd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# performance 0.12.2 + +Patch release, to ensure that _performance_ runs with older version of +_datawizard_ on Mac OSX with R (old-release). + # performance 0.12.1 ## General diff --git a/R/check_heterogeneity_bias.R b/R/check_heterogeneity_bias.R index 7b7b22fcf..424bf8b5b 100644 --- a/R/check_heterogeneity_bias.R +++ b/R/check_heterogeneity_bias.R @@ -23,17 +23,20 @@ #' Modeling of Time-Series Cross-Sectional and Panel Data. Political Science #' Research and Methods, 3(1), 133–153. #' -#' @examples +#' @examplesIf insight::check_if_installed("datawizard", minimum_version = "0.12.0", quietly = TRUE) #' data(iris) #' iris$ID <- sample(1:4, nrow(iris), replace = TRUE) # fake-ID #' check_heterogeneity_bias(iris, select = c("Sepal.Length", "Petal.Length"), by = "ID") #' @export check_heterogeneity_bias <- function(x, select = NULL, by = NULL, group = NULL) { + insight::check_if_installed("datawizard", minimum_version = "0.12.0") + ## TODO: deprecate later if (!is.null(group)) { insight::format_warning("Argument `group` is deprecated and will be removed in a future release. Please use `by` instead.") # nolint by <- group } + if (insight::is_model(x)) { by <- insight::find_random(x, split_nested = TRUE, flatten = TRUE) if (is.null(by)) { diff --git a/cran-comments.md b/cran-comments.md index 010c0c091..0fbbade1c 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1 @@ -This release fixes errors in CRAN checks. - -Additionally, in the process of stabilizing the API/user interface for packages from the 'easystats' project, some argument names were renamed and old names have been deprecated. This will not break downstream dependent packages, however, reverse-dependency checks will raise warnings. We have already patched all affected downstream packages and will submit them to CRAN in the next few days, after the release of 'performance'. Once this release-cycle is complete, all warnings due to deprecated argument names should be resolved. \ No newline at end of file +This is a patch release that fixes failing CRAN checks for Mac OS old-rel. diff --git a/man/check_heterogeneity_bias.Rd b/man/check_heterogeneity_bias.Rd index 21534540e..46f9f70a5 100644 --- a/man/check_heterogeneity_bias.Rd +++ b/man/check_heterogeneity_bias.Rd @@ -25,9 +25,11 @@ cause a heterogeneity bias, i.e. if variables have a within- and/or between-effect (\emph{Bell and Jones, 2015}). } \examples{ +\dontshow{if (insight::check_if_installed("datawizard", minimum_version = "0.12.0", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} data(iris) iris$ID <- sample(1:4, nrow(iris), replace = TRUE) # fake-ID check_heterogeneity_bias(iris, select = c("Sepal.Length", "Petal.Length"), by = "ID") +\dontshow{\}) # examplesIf} } \references{ \itemize{ diff --git a/tests/testthat/test-check_heterogeneity_bias.R b/tests/testthat/test-check_heterogeneity_bias.R index 7042f3064..429dcfc0c 100644 --- a/tests/testthat/test-check_heterogeneity_bias.R +++ b/tests/testthat/test-check_heterogeneity_bias.R @@ -1,4 +1,5 @@ test_that("check_heterogeneity_bias", { + skip_if_not_installed("datawizard", minimum_version = "0.12.0") data(iris) set.seed(123) iris$ID <- sample.int(4, nrow(iris), replace = TRUE) # fake-ID diff --git a/tests/testthat/test-logLik.R b/tests/testthat/test-logLik.R deleted file mode 100644 index 5da5ef923..000000000 --- a/tests/testthat/test-logLik.R +++ /dev/null @@ -1,29 +0,0 @@ -skip_on_cran() - -test_that("logLik", { - skip_if_not_installed("plm") - skip_if_not_installed("withr") - - withr::local_options(list(expressions = 25)) - set.seed(1) - nnn <- 100 - ddta <- data.frame( - x1 = rnorm(nnn), - x2 = rnorm(nnn), - id = rep_len(1:(nnn / 10), nnn), - year = rep_len(1:11, nnn) - ) - ddta$y <- ddta$x1 * 0.5 - ddta$x2 * 0.5 + rnorm(nnn) - - m1 <- lm(y ~ x1 + x2, data = ddta) - l1 <- logLik(m1) - - m2 <- plm( - y ~ x1 + x2, - data = ddta, - model = "pooling", - index = c("id", "year") - ) - l2 <- logLik(m2) - expect_equal(l1, l2, tolerance = 1e-3, ignore_attr = TRUE) -})