R/search_function.R

Defines functions search_function

Documented in search_function

#' search functions
#'
#' Like search_files but for functions
#'
#' @param pat Pattern to match
#' @param fun Function to inspect
#' @export
search_function <- function(pat, fun) {
  f <- paste(as.character(as.list(fun)), collapse = "\n")
  dir <- tempdir()
  path <- file.path(dir, "fun")
  writeLines(f, path)
  search_files(pat, dir)
}

Try the tfse package in your browser

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

tfse documentation built on May 2, 2019, 11:28 a.m.