Skip to content

Commit

Permalink
improved checkArg function
Browse files Browse the repository at this point in the history
  • Loading branch information
Manon Martin authored and Manon Martin committed Mar 18, 2024
1 parent 6f2496d commit 06cbb03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/checkArg.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ checkArg <- function(arg, checks, can.be.null = FALSE) {
stop(deparse(substitute(arg)), " is null.")
}
} else {
for (c in checks) {
if (!check.list[[c]][[1]](arg)) {
for (cc in checks) {
if (!check.list[[cc]][[1]](arg)) {
stop(deparse(substitute(arg)), " is not ",
check.list[[c]][[2]], ".")
check.list[[cc]][[2]], ".")
}
}
}
Expand Down

0 comments on commit 06cbb03

Please sign in to comment.