Skip to content

Commit

Permalink
fix a few validations
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjclark committed May 28, 2024
1 parent e83add2 commit 0276d8c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/validations.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ as_one_integer <- function(x, allow_na = FALSE) {

#'@noRd
deparse0 = function (x, max_char = NULL, ...) {
out <- collapse(deparse(x, ...))
out <- paste(deparse(x, ...), sep = "", collapse = "")
if (isTRUE(max_char > 0)) {
out <- substr(out, 1L, max_char)
}
Expand All @@ -150,7 +150,8 @@ deparse0 = function (x, max_char = NULL, ...) {
validate_silent <- function(silent) {
silent <- as_one_integer(silent)
if (silent < 0 || silent > 2) {
stop2("'silent' must be between 0 and 2.")
stop("'silent' must be between 0 and 2.",
call. = FALSE)
}
silent
}
Expand Down
Binary file modified src/RcppExports.o
Binary file not shown.
Binary file modified src/mvgam.dll
Binary file not shown.
Binary file modified src/trend_funs.o
Binary file not shown.

0 comments on commit 0276d8c

Please sign in to comment.