Skip to content

Commit

Permalink
Prepare CRAN submission (#870)
Browse files Browse the repository at this point in the history
* Prepare CRAN submission

* fix win builder issues

* skipt on CRAN

* "Unknown argument(s) specified to be passed to tmbprofile" (#872)

* "Unknown argument(s) specified to be passed to tmbprofile"
Fixes #871

* fix, test

* news, version

* add tests

* cran comments, fix tests

* submitted
  • Loading branch information
strengejacke authored Apr 5, 2023
1 parent 14af423 commit 2d7db77
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 11 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.20.2
Date: 2023-01-27 10:46:55 UTC
SHA: 4e29a4f13a90a32b5af3797d6c125abecc600964
Version: 0.20.3
Date: 2023-04-05 06:07:12 UTC
SHA: ac64894ca63668acf04804f79a9f02490ade31ca
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: parameters
Title: Processing of Model Parameters
Version: 0.20.2.19
Version: 0.20.3
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down Expand Up @@ -108,6 +108,7 @@ Suggests:
ClassDiscovery,
clubSandwich,
cluster,
coda,
cplm,
dbscan,
domir (>= 0.2.0),
Expand Down
7 changes: 6 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
Maintainance release. Also fixes rev-dep issues with forthcoming update of the *insight* package.
We checked 33 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

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

This update breaks the *performance* package. Test failures are expected, because a bug fix in *parameters* affects test results of the *performance* package. Tests have been corrected and an update of *performance* is ready to be submitted once the *parameters* package is accepted on CRAN.
3 changes: 3 additions & 0 deletions tests/testthat/test-bootstrap_emmeans.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ skip_on_cran()
test_that("emmeans | lm", {
skip_if_not_installed("emmeans")
skip_if_not_installed("boot")
skip_if_not_installed("coda")

model <- lm(mpg ~ log(wt) + factor(cyl), data = mtcars)

Expand Down Expand Up @@ -33,6 +34,7 @@ test_that("emmeans | lmer", {
skip_if_not_installed("emmeans")
skip_if_not_installed("boot")
skip_if_not_installed("lme4")
skip_if_not_installed("coda")

model <- lme4::lmer(mpg ~ log(wt) + factor(cyl) + (1 | gear), data = mtcars)

Expand All @@ -59,6 +61,7 @@ test_that("emmeans | lmer", {
})

test_that("emmeans | glmmTMB", {
skip_if_not_installed("coda")
skip_if_not_installed("emmeans")
skip_if_not_installed("boot")
skip_if_not_installed("lme4")
Expand Down
23 changes: 23 additions & 0 deletions tests/testthat/test-coxph.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,26 @@ test_that("model_parameters", {
tolerance = 1e-4
)
})

test_that("model_parameters", {
suppressPackageStartupMessages(library(survival, quietly = TRUE))

# Create the simplest test data set
test1 <- list(
time = c(4, 3, 1, 1, 2, 2, 3),
status = c(1, 1, 1, 0, 1, 1, 0),
x = c(0, 2, 1, 1, 1, 0, 0),
sex = c(0, 0, 0, 0, 1, 1, 1)
)
# Fit a stratified model
m2 <- coxph(Surv(time, status) ~ x + strata(sex), test1)
expect_equal(model_parameters(m2)$Coefficient, 0.8023179, tolerance = 1e-4)
expect_equal(model_parameters(m2)$z, 0.9756088, tolerance = 1e-4)
expect_equal(model_parameters(m2)$p, 0.3292583, tolerance = 1e-4)

unloadNamespace("rms")
unloadNamespace("quantreg")
unloadNamespace("multcomp")
unloadNamespace("TH.data")
unloadNamespace("survival")
})
8 changes: 2 additions & 6 deletions tests/testthat/test-model_parameters.efa_cfa.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@ test_that("FactoMineR", {
))
expect_identical(c(ncol(x), nrow(x)), c(5L, 11L))

x <- suppressWarnings(model_parameters(
FactoMineR::FAMD(iris, ncp = 3, graph = FALSE),
threshold = 0.2,
sort = TRUE
))
expect_identical(c(ncol(x), nrow(x)), c(5L, 5L))
# x <- suppressWarnings(model_parameters(FactoMineR::FAMD(iris, ncp = 3, graph = FALSE), threshold = 0.2, sort = TRUE))
# expect_identical(c(ncol(x), nrow(x)), c(5L, 5L))
})

test_that("BayesFM", {
Expand Down

0 comments on commit 2d7db77

Please sign in to comment.