read_db: Read a spreadsheet.

View source: R/read_db.R

read_dbR Documentation

Read a spreadsheet.

Description

A helper utility to handle reading of spreadsheet files.

Usage

read_db(file, filetype = "auto", ...)

Arguments

file

The name of the file to be read.

filetype

The filetype of the input spreadsheet. Microsoft Excel (.xlsx and .xls) and Open Document Format (.ods; as used by OpenOffice/LibreOffice for example) are supported, as are comma- and tab-delimited formats (.csv, .tsv/.txt). The default behaviour is to guess the format from the file extension. If this does not work or you know better than the machine, then this option can be used to specify the filetype.

...

Additional parameters passed to the file reader. The parameters accepted depend on the input filetype.

Details

This function should not need to be called directly by the user.

The code used to read the file depends on the filetype. The filetype is determined by the extension given in the file parameter or can be overridden by the filetype parameter. For more information about file reading parameters, have a look at the documentation for the respective packages: read_excel for reading .xlsx and .xls files. read_ods for reading .ods files. This is the Open Document standard used by software such as OpenOffice and LibreOffice. read.csv for reading .csv files. If filetype = 'csv2', then read.csv2 is used (where commas are used as decimal separators as is common in Europe). read.delim for reading .tsv, .tab, .txt files. This is just tab-delimited text.

See Also

make_ids.


rupertoverall/idLabelR documentation built on Aug. 27, 2023, 12:39 p.m.