Skip to contents

Reads all text files in a folder and creates a list of pivot_table objects, one from each file. Each file is expected to contain a pivot table. Each line in a file corresponds to a row in a table; within each row, columns are defined by a separator character. File name is included as part of each object attributes.

Usage

read_text_folder(folder, sep = ";", encoding = "UTF-8")

Arguments

folder

A string, folder name.

sep

Column separator character.

encoding

A string, encoding to be assumed for input strings.

Value

A pivot_table object list.

Details

When multiple files are handled, the file name may contain information associated with the pivot table, it could be the table page information. In order not to lose this information, it is always stored in each pivot_table object.

See also

Examples


folder <- system.file("extdata", "csvfolder", package = "flattabler")
lpt <- read_text_folder(folder)