Skip to content

Commit

Permalink
check if optional_args is list or null
Browse files Browse the repository at this point in the history
  • Loading branch information
lgessl committed Nov 28, 2023
1 parent d60b07e commit d623b72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ check_fitter <- function(
if(!is.function(fitter)){
stop("fitter must be a function.")
}
if(!(is.null(optional_args) || is.list(optional_args))){
stop("optional_args must be a list.")
}
parameters <- names(formals(fitter))
for(pos_arg in c("x", "y")){
if(!(pos_arg %in% parameters)){
Expand Down

0 comments on commit d623b72

Please sign in to comment.