Skip to content

Commit

Permalink
fix S3 method compat (hidden CRAN check)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbolker committed Apr 21, 2023
1 parent a6e9119 commit ebf7900
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion R/bootMer.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ as.data.frame.bootMer <- function(x,...) {

## FIXME: collapse convergence warnings (ignore numeric values
## when tabulating) ?
print.bootWarnings <- function(x, verbose=FALSE) {
print.bootWarnings <- function(x, verbose=FALSE, ...) {
checkDots(..., .action = "warning")
msgs <- attr(x, "boot.all.msgs")
if (is.null(msgs) || all(lengths(msgs)==0)) {
return(invisible(NULL))
Expand Down
4 changes: 2 additions & 2 deletions R/profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ xyplot.thpr <-
}

## copy of stats:::format.perc (not exported, and ":::" being forbidden nowadays):
format.perc <- function (probs, digits) {
paste(format(100 * probs, trim = TRUE,
format.perc <- function (x, digits, ...) {
paste(format(100 * x, trim = TRUE,
scientific = FALSE, digits = digits),
"%")
}
Expand Down
14 changes: 14 additions & 0 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -1373,3 +1373,17 @@ combineLists <- function(..., fmatrix="list", flist="c", fvector="rbind",
}
result
}

## copied from glmmTMB::check_dots
checkDots <- function (..., .ignore = NULL, .action = "stop")
{
L <- list(...)
if (length(.ignore) > 0) {
L <- L[!names(L) %in% .ignore]
}
if (length(L) > 0) {
FUN <- get(.action)
FUN("unknown arguments: ", paste(names(L), collapse = ","))
}
return(NULL)
}

0 comments on commit ebf7900

Please sign in to comment.