From d09659f0e609bc8c1a6c390329d8f2d3b3ac5b24 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Tue, 8 Jun 2021 15:13:01 +0200
Subject: [PATCH] Fix typo

---
 R/agghoo.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/R/agghoo.R b/R/agghoo.R
index 4a25b17..528df2a 100644
--- a/R/agghoo.R
+++ b/R/agghoo.R
@@ -50,7 +50,7 @@ agghoo <- function(data, target, task = NA, gmodel = NA, params = NA, quality =
     params <- as.list(params)
   if (!is.na(params) && !is.list(params))
     stop("params: numerical, character, or list (passed to model)")
-  if (!is.na(gmodel) && !is.character(model) && is.na(params))
+  if (!is.na(gmodel) && !is.character(gmodel) && is.na(params))
     stop("params must be provided when using a custom model")
   if (is.na(gmodel) && !is.na(params))
     stop("model must be provided when using custom params")
-- 
2.44.0