fldict: Get Data Dictionary for Files in Folder
Description
Get information about data files in a folder path. Use dict() on a single data frame or getinfo(0) to explore a single column.
Author: Bryce Chamberlain.
Usage
fldict(
folder = NULL,
file.list = NULL,
pattern = "^[^~]+[.](xls[xmb]?|csv|rds|xml)",
ignore.case = TRUE,
recursive = TRUE,
...
)
Arguments
folder
File path of the folder to create a dictionary for. Pass either this or file.list. file.list will override this argument.
file.list
List of files to create a combined dictionary for. Pass either this or folder. This will ovveride folder.
pattern
Pattern to match files in the folder. By default we use a pattern that matches read.any-compatible data files and skips temporary Office files. Passed to list.files.
ignore.case
Ignore case when checking pattern. Passed to list.files.
recursive
Check files recursively. Passed to list.files.
...
Other arguments to read.any for reading in files. Consider using a first_column_name vector, etc.
Value
List with the properties:
sSummary data of each dataset.
lLine data with a row for each column in each dataset.
Examples
Run this code# NOT RUN {
fl = fldict( 'path/to/folder' )
names( fl )
fl$sheets
fl$columns
# }
Run the code above in your browser using DataLab