R/getTags.R

Defines functions getTags.smoof_generator getTags.smoof_wrapped_function getTags.smoof_function getTags

Documented in getTags

#' Returns vector of associated tags.
#'
#' @template arg_smoof_function
#' @return [\code{character}]
#' @export
getTags = function(fn) {
  UseMethod("getTags")
}

#' @export
getTags.smoof_function = function(fn) {
  return(attr(fn, "tags"))
}

#' @export
getTags.smoof_wrapped_function = function(fn) {
  return(getTags(getWrappedFunction(fn)))
}

#' @export
getTags.smoof_generator = function(fn) {
  return(attr(fn, "tags"))
}

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.