load_data: Check and load input data

Description Usage Arguments Value Examples

View source: R/load_data.R

Description

This internal function checks input data before subsequent processing by *_format_data functions. It will accept all data files in a given directory, or any number of data files specified by their names, or any number of dataframes supplied as a named list, or even a single dataframe supplied as is.

Usage

1
load_data(input = NULL, skip_lines = NULL)

Arguments

input

A directory name, a vector of file names, a single dataset already loaded in memory as a dataframe, or a list of datasets already loaded in memory as dataframes.

skip_lines

The number of lines to skip at the beginning of CSV files (usually containing header information before the actual data starts).

Value

A named list of dataframes to be further processed by *_format_data functions.

Examples

1
2
3
4
## Not run: 
load_data("my_data_directory", 4)

## End(Not run)

Guilz/rfret documentation built on Oct. 18, 2021, 2:14 p.m.