Skip to content

Commit 4e40a16

Browse files
committed
Update test-check_outliers.R
1 parent 87a15aa commit 4e40a16

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

tests/testthat/test-check_outliers.R

+15-1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ test_that("multiple methods which", {
201201
# We exclude method ics because it is too slow
202202
test_that("all methods which", {
203203
skip_if_not_installed("bigutilsr")
204+
skip_if_not_installed("MASS")
205+
skip_if_not_installed("dbscan")
206+
skip_if_not_installed("ICS")
207+
skip_if_not_installed("ICSOutlier")
208+
skip_if_not_installed("loo")
209+
204210
expect_identical(
205211
which(check_outliers(mtcars,
206212
method = c(
@@ -224,7 +230,13 @@ test_that("all methods which", {
224230

225231
test_that("multiple methods with ID", {
226232
skip_if_not_installed("bigutilsr")
227-
data <- datawizard::rownames_as_column(mtcars, var = "car")
233+
skip_if_not_installed("MASS")
234+
skip_if_not_installed("dbscan")
235+
skip_if_not_installed("ICS")
236+
skip_if_not_installed("ICSOutlier")
237+
skip_if_not_installed("loo")
238+
239+
data <- datawizard::rownames_as_column(mtcars, var = "car")
228240
x <- attributes(check_outliers(data,
229241
method = c(
230242
"zscore", "zscore_robust", "iqr", "ci", "eti", "hdi", "bci",
@@ -282,6 +294,7 @@ test_that("cook multiple methods which", {
282294

283295
test_that("pareto which", {
284296
skip_if_not_installed("dbscan")
297+
skip_if_not_installed("loo")
285298
skip_if_not_installed("rstanarm")
286299
set.seed(123)
287300
model <- rstanarm::stan_glm(mpg ~ qsec + wt, data = mtcars, refresh = 0)
@@ -295,6 +308,7 @@ test_that("pareto which", {
295308

296309
test_that("pareto multiple methods which", {
297310
skip_if_not_installed("dbscan")
311+
skip_if_not_installed("loo")
298312
skip_if_not_installed("rstanarm")
299313
set.seed(123)
300314
model <- rstanarm::stan_glm(mpg ~ qsec + wt, data = mtcars, refresh = 0)

0 commit comments

Comments
 (0)