Description Usage Arguments Details Value
Find scripts that have an object or function that you know the name or package of
1 2 | findScriptsByParsing(path = ".", filename_pattern = ".R$",
recursive = FALSE, pkg = NULL, code_target, func_pattern = "")
|
path |
a character vector of full path names; the default corresponds to
the working directory, |
filename_pattern |
a regular expression- default is |
recursive |
logical. Should the listing recurse into directories? |
pkg |
The name of a currently loaded package passed as a string. |
code_target |
character string containing a regular expression to be matched against code
while parsing through scripts. If a character vector of length 2 or more is supplied,
the first element is used with a warning. If looking for a pattern, try |
func_pattern |
character string containing a regular expression to be matched
against the functions found in the package chosen in the argument |
Parses scripts and finds which scripts have a sought object, such as the string 'password123'
or a functional dependency on a package, e.g. RJDBC.
This function actually reads through scripts and will discard scripts that do
not run due to typos and bad syntax.
This function will NOT find a pattern such as 'x <- 3^2'
- for that task,
use findScriptsByPattern
.
NOTE: This function cannot distinguish between functions from different
packages that have the similar names.
A data.frame with five columns:
script - The name of the script containing the target,
linenum - The line number on which the target is found,
col - the number of characters into the line that the target can be found,
text - the target matched,
line - the target within its context
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.