From 36d3dc73036f92ff84029306908fe29796272386 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Thu, 24 Feb 2022 23:39:05 +0100 Subject: [PATCH] styler --- R/check_distribution.R | 2 +- R/model_performance_default.R | 3 --- tests/testthat/test-model_performance.merMod.R | 7 ++++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/R/check_distribution.R b/R/check_distribution.R index 635f5d27a..41f972449 100644 --- a/R/check_distribution.R +++ b/R/check_distribution.R @@ -50,7 +50,7 @@ #' #' @examples #' if (require("lme4") && require("parameters") && -#' require("see") && require("patchwork") && require("randomForest")) { +#' require("see") && require("patchwork") && require("randomForest")) { #' data(sleepstudy) #' #' model <<- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) diff --git a/R/model_performance_default.R b/R/model_performance_default.R index ad44d52be..b1c5eb847 100644 --- a/R/model_performance_default.R +++ b/R/model_performance_default.R @@ -28,7 +28,6 @@ model_performance.default <- function(model, metrics = "all", verbose = TRUE, .. - .check_bad_metrics <- function(metrics, all_metrics, verbose = TRUE) { # check for valid input bad_metrics <- which(!metrics %in% all_metrics) @@ -44,5 +43,3 @@ model_performance.default <- function(model, metrics = "all", verbose = TRUE, .. metrics } - -# default methods ----------------------- diff --git a/tests/testthat/test-model_performance.merMod.R b/tests/testthat/test-model_performance.merMod.R index 266409f1b..da2b605cb 100644 --- a/tests/testthat/test-model_performance.merMod.R +++ b/tests/testthat/test-model_performance.merMod.R @@ -15,12 +15,13 @@ if (requiet("testthat") && requiet("insight") && requiet("performance") && requi test_that("model_performance.merMod AICc", { - m1 <- lmer(mpg ~ disp + am + (1|cyl), data = mtcars) + m1 <- lmer(mpg ~ disp + am + (1 | cyl), data = mtcars) m2 <- lm(mpg ~ hp + vs, data = mtcars) expect_equal(compare_performance(m1, m2, metrics = "AICc")$AICc, - c(177.52804, 182.88598), - tolerance = 1e-3) + c(177.52804, 182.88598), + tolerance = 1e-3 + ) expect_equal(model_performance(m1, metrics = "AICc")$AICc, 177.52804, tolerance = 1e-3) expect_equal(performance_aicc(m1), 177.52804, tolerance = 1e-3) })