From c184e24c2f55c9f73cde297d3e27a7050303fd8c Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 15 Jul 2024 18:59:41 +0200 Subject: [PATCH 1/3] Prepare CRAN release (#754) --- CRAN-SUBMISSION | 6 +++--- DESCRIPTION | 2 +- cran-comments.md | 4 +--- tests/testthat/test-logLik.R | 29 ----------------------------- 4 files changed, 5 insertions(+), 36 deletions(-) delete mode 100644 tests/testthat/test-logLik.R diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 167146dfe..b68bc3721 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.1 +Date: 2024-07-15 15:33:09 UTC +SHA: 3196e65635aecc88bbdf00df832b96f03eb8a313 diff --git a/DESCRIPTION b/DESCRIPTION index 1b711cb64..839392906 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.1 Authors@R: c(person(given = "Daniel", family = "Lüdecke", diff --git a/cran-comments.md b/cran-comments.md index 010c0c091..127ca3820 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 +Maintainance release. 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) -}) From a81430d736614cf4d5027a4c0e8770f86222f94a Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 17 Jul 2024 11:18:38 +0200 Subject: [PATCH 2/3] Make sure performance works with datawizard 0.10.0 (#755) --- DESCRIPTION | 2 +- R/check_heterogeneity_bias.R | 5 ++++- man/check_heterogeneity_bias.Rd | 2 ++ tests/testthat/test-check_heterogeneity_bias.R | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 839392906..870f7354e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: performance Title: Assessment of Regression Models Performance -Version: 0.12.1 +Version: 0.12.1.1 Authors@R: c(person(given = "Daniel", family = "Lüdecke", 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/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 From 43c72923a9f1ae90fd9d836273dd907fb26911f0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 18 Jul 2024 14:58:26 +0200 Subject: [PATCH 3/3] prepare patch (#756) --- CRAN-SUBMISSION | 6 +++--- DESCRIPTION | 2 +- NEWS.md | 5 +++++ cran-comments.md | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index b68bc3721..abb3c037a 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 0.12.1 -Date: 2024-07-15 15:33:09 UTC -SHA: 3196e65635aecc88bbdf00df832b96f03eb8a313 +Version: 0.12.2 +Date: 2024-07-17 21:02:38 UTC +SHA: d4c45126ca666644785dc64d2af6b87eee9ca39b diff --git a/DESCRIPTION b/DESCRIPTION index 870f7354e..aa64c172c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: performance Title: Assessment of Regression Models Performance -Version: 0.12.1.1 +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/cran-comments.md b/cran-comments.md index 127ca3820..0fbbade1c 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1 +1 @@ -Maintainance release. +This is a patch release that fixes failing CRAN checks for Mac OS old-rel.