getDepends: Get dependent input, output and data files for an R script.

Description Usage Arguments Value Author(s) See Also

View source: R/dependFuns.R

Description

This function takes an R script, and identifies the files which are read (input and/or data) and written (output).

Usage

1
getDepends(file, info = as(readScript(file), "ScriptInfo"), fileFunctionNames = FileFunctionNames(), prev = info, loadPackages = TRUE, addExpressionNum = TRUE)

Arguments

file

An *.R file to analyze.

info

An object of class ScriptInfo, created by readScript() containing the script information.

fileFunctionNames

The names of functions which can read or write files. Default functions are provided by FileFunctionNames()

prev
loadPackages

logical, should the packages required by the script be loaded?

addExpressionNum

logical, should the expressions be numbered.

Value

Returns a data.frame consisting of,

filename

The name of the file which is being read/loaded or written/saved

operation

The operation being conducted on that file name

expressionNum

optional, if addExpressionNum = TRUE, adds the expression number

Author(s)

Duncan Temple Lang

See Also

getFilesRead getVariableDepends


duncantl/CodeAnalysis documentation built on Jan. 20, 2020, 5:17 a.m.