R/isSmoofFunction.R

Defines functions isSmoofFunction

Documented in isSmoofFunction

#' Checks whether the given object is a \code{smoof_function} or a
#' \code{smoof_wrapped_function}.
#'
#' @param object [any]\cr
#'   Arbitrary R object.
#' @return [\code{logical(1)}]
#' @seealso \code{\link{addCountingWrapper}}, \code{\link{addLoggingWrapper}}
#' @export
isSmoofFunction = function(object) {
  return(inherits(object, c("smoof_function", "smoof_wrapped_function")))
}

Try the smoof package in your browser

Any scripts or data that you put into this service are public.

smoof documentation built on March 31, 2023, 11:48 p.m.