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,
  verbose = FALSE,
  ...
)
Value
List with the properties:
- s
 
Summary data of each dataset.
- l
 
Line data with a row for each column in each dataset.
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.
- verbose
 
Print helpful information.
- ...
 
Other arguments to read.any for reading in files. Consider using a first_column_name vector, etc.
Examples
Run this code
folder = system.file('extdata', package = 'easyr')
fl = fldict(folder)
names(fl)
fl$sheets
fl$columns
Run the code above in your browser using DataLab