Skip to content

Commit

Permalink
Merge branch 'main' into cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke authored Dec 3, 2024
2 parents 88c8201 + 7eb57aa commit 680f8cb
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: see
Title: Model Visualisation Toolbox for 'easystats' and 'ggplot2'
Version: 0.9.0.9
Version: 0.9.0.12
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down Expand Up @@ -121,4 +121,4 @@ Config/testthat/edition: 3
Config/testthat/parallel: true
Config/Needs/website: easystats/easystatstemplate
Config/rcmdcheck/ignore-inconsequential-notes: true
Remotes: easystats/performance, easystats/parameters, easystats/insight
Remotes: easystats/performance, easystats/parameters, easystats/datawizard
7 changes: 2 additions & 5 deletions R/plot.check_collinearity.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,11 @@ plot.see_check_collinearity <- function(x,
dat$group[dat$VIF >= 5 & dat$VIF < 10] <- "moderate"
dat$group[dat$VIF >= 10] <- "high"

dat <- datawizard::data_rename(
dat <- datawizard::data_select(
dat,
pattern = c("Term", "VIF", "SE_factor", "Component"),
replacement = c("x", "y", "se", "facet")
select = c(x = "Term", y = "VIF", facet = "Component", group = "group")
)

dat <- datawizard::data_select(dat, select = c("x", "y", "facet", "group"))

if (insight::n_unique(dat$facet) <= 1) {
dat$facet <- NULL
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion tests/testthat/test-plot.check_collinearity.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
test_that("`plot.see_check_collinearity()` works", {
m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
result <- performance::check_collinearity(m)

expect_s3_class(plot(result), "gg")

skip_if_not_installed("vdiffr")
vdiffr::expect_doppelganger(
title = "plot.check_collinearity",
fig = plot(result)
)
})
1 change: 1 addition & 0 deletions tests/testthat/test-plot.check_dag.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
skip_if_not_installed("ggdag")
skip_if_not_installed("dagitty")
skip_if_not_installed("vdiffr")

test_that("`plot()` for check_dag", {
set.seed(1234)
Expand Down

0 comments on commit 680f8cb

Please sign in to comment.