findReadDataFuns: Identify functions that call read and write functions

View source: R/freeVariables.R

findReadDataFunsR Documentation

Identify functions that call read and write functions

Description

With no arguments, each of these functions either return a fixed set of known functions that read data or write data or create a file for a graphics device. One can also pass the source of function definitions, e.g., a named list of functions, a character vector of R file names, a directory containing R files, an environment, etc. and the functions analyze those functions to see if they call any of the the foundatinal functions and if so, include those wrapper functions in the return value.

Usage

findReadDataFuns(funs, ..., primitiveFuns = getReadDataFuns(...))
findWriteDataFuns(funs, ..., primitiveFuns = getOutputDataFuns(...))

Arguments

funs

the source of function definitions. This can be the name of a directory, a file, a named list of functions, an environment containing functions.

...

character strings naming additional primitive functions. Functions that contain a call to any of these are considered matches.

primitiveFuns

the character vector providing the names of the primitive functions.

Details

findReadDataFuns is quite general and can be readily repurposed by specifying a different vector for primitiveFuns to find functions that call any of these different functions.

Value

a character vector

Author(s)

Duncan Temple Lang


duncantl/CodeAnalysis documentation built on Feb. 21, 2024, 10:49 p.m.