getFilesRead: Find which files are read in code

View source: R/readFile.R

getFilesReadR Documentation

Find which files are read in code

Description

This finds the names of the files that are read by R functions such as read.table, read.csv, scan, etc.

Usage

getFilesRead(fun, ..., recursive = FALSE)

Arguments

fun

R code

...

additional arguments passed to isReadFileCall via find_nodes

recursive

a logical value, currently ignored.

Value

rstatic nodes giving the names of the "files" that were found in the code.

Author(s)

Duncan Temple Lang

See Also

findPkgReadFuns (unexported in CodeAnalysis) for finding functions that read files.

Examples

f = system.file("samples", "results-multi.R", package = "CodeDepends")
getFilesRead(f)

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