read2list: Read various input file formats into a list of data frames

Description Usage Arguments See Also

Description

read2list is meant to act as a universal reading function as it attempts to read a number of different file formats into a list of data frames.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
read2list(
  dat,
  nsheets = 1,
  sheet = NULL,
  keep.tibble = FALSE,
  skip = 0,
  sep = NULL,
  lines = FALSE,
  dec = NULL,
  ...,
  verbose = TRUE,
  x.verbose = FALSE
)

Arguments

dat

character. File path.

nsheets

integer. Number of sheets to be read if file is of type ".xls" or ".xlsx". All sheets starting from 1 up to the given number in the respective data file will be read. If more than one file is read this must be be an integer vector with the numbers of sheets in exactly the same order as the files.

sheet

integer or list. Sheet(s) to be read if file is of type ".xls" or ".xlsx". The sheets defined by the given integer in the respective data file will be read. If more than one file is read this must be be a list with the sheet number(s) in exactly the same order as the files. If there are many files and only one sheet vector the same sheet(s) wiƶl be read from all files.

keep.tibble

logical. Should the data from Excel files read with readxl::read_excel be coerce to data.frames or kept in the original tibble format? Defaults to FALSE, i.e., a data.frame is returned.

skip

integer. Number of lines to skip from the top of the file.

sep

character. Field delimiter passed to 'read.delim' when reading text files.

lines

lines. Should the file be read line by line into a character vector by readLines()?

dec

character. The decimal separator for numbers.

...

Additional arguments passed to functions.

verbose

logical. Should verbose output be printed?

x.verbose

logical. Should extended verbose output be printed?

See Also

read.delim

read_excel

read.to.list


readmoRe documentation built on Aug. 19, 2021, 9:07 a.m.

Related to read2list in readmoRe...