From ef9d396f62550b515b810f2504cc3ae0b98758e3 Mon Sep 17 00:00:00 2001 From: Toby Dylan Hocking Date: Tue, 17 Dec 2024 21:17:11 -0500 Subject: [PATCH] type convert error for non-function --- R/var_args_list.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/var_args_list.R b/R/var_args_list.R index 989ac12..aaeae5a 100644 --- a/R/var_args_list.R +++ b/R/var_args_list.R @@ -63,7 +63,9 @@ var_args_list <- structure(function function(x)utils::type.convert(x,as.is=TRUE) }else if(isFALSE(type.convert)){ identity - }else type.convert + }else if(is.function(type.convert)){ + type.convert + }else stop("type.convert should be either TRUE or FALSE or a function") names(fun.list)[[group.i]] <- pattern.name has.name <- TRUE "("