Skip to content

Commit b08dcc9

Browse files
committed
Fix, add snapshot
1 parent f713ae0 commit b08dcc9

File tree

5 files changed

+90
-7
lines changed

5 files changed

+90
-7
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: see
33
Title: Model Visualisation Toolbox for 'easystats' and 'ggplot2'
4-
Version: 0.9.0.10
4+
Version: 0.9.0.11
55
Authors@R:
66
c(person(given = "Daniel",
77
family = "Lüdecke",

R/plot.check_collinearity.R

+2-5
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@ plot.see_check_collinearity <- function(x,
3838
dat$group[dat$VIF >= 5 & dat$VIF < 10] <- "moderate"
3939
dat$group[dat$VIF >= 10] <- "high"
4040

41-
dat <- datawizard::data_rename(
41+
dat <- datawizard::data_select(
4242
dat,
43-
select = c("Term", "VIF", "SE_factor", "Component"),
44-
replacement = c("x", "y", "se", "facet")
43+
select = c(x = "Term", y = "VIF", facet = "Component", group = "group")
4544
)
4645

47-
dat <- datawizard::data_select(dat, select = c("x", "y", "facet", "group"))
48-
4946
if (insight::n_unique(dat$facet) <= 1) {
5047
dat$facet <- NULL
5148
}
Loading
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
test_that("`plot.see_check_collinearity()` works", {
22
m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
33
result <- performance::check_collinearity(m)
4-
54
expect_s3_class(plot(result), "gg")
5+
6+
skip_if_not_installed("vdiffr")
7+
vdiffr::expect_doppelganger(
8+
title = "plot.check_collinearity",
9+
fig = plot(result)
10+
)
611
})

tests/testthat/test-plot.check_dag.R

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
skip_if_not_installed("ggdag")
22
skip_if_not_installed("dagitty")
3+
skip_if_not_installed("vdiffr")
34

45
test_that("`plot()` for check_dag", {
56
set.seed(1234)

0 commit comments

Comments
 (0)