Skip to content

Commit

Permalink
CRAN 5.1.2 version
Browse files Browse the repository at this point in the history
  • Loading branch information
laresbernardo committed Apr 5, 2022
1 parent a7ab025 commit 8bfa511
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ check_opts <- function(inputs, opts,
inputs <- inputs[which(!inputs %in% opts)]
}
not(paste(
"Your", input_name, vector2text(inputs),
"Your", input_name, formatColoured(v2t(inputs), cat = FALSE),
ifelse(length(inputs) > 1, "are", "is"),
"NOT valid;", toupper(type), "should match",
"these options:\n ", vector2text(opts)
"NOT valid;", toupper(type), "inputs should match",
"these options:", formatColoured(v2t(opts), colour = "green", cat = FALSE)
))
}
if (!quiet) {
Expand Down Expand Up @@ -74,11 +74,11 @@ check_attr <- function(object, attr = "type", check = NULL, stop = TRUE) {
if (is.null(check)) stop("You must set a valid check input")
if (is.null(attr)) {
attrs <- attributes(object)
nattrs <- length(attrs)
if (nattrs > 0) {
stop("Your objct has no attributes to be checked")
if (length(attrs) > 0) {
stop("Your attr input should be any of: ",
formatColoured(v2t(attrs), colour = "green", cat = FALSE))
} else {
stop("Your attr input should be any of: ", v2t(attrs))
stop("Your objct has no attributes to be checked")
}
}
aux <- attr(object, attr)
Expand Down

0 comments on commit 8bfa511

Please sign in to comment.