View source: R/f - Read data from file.R
f_read_data_from_file | R Documentation |
Reads data from file.
f_read_data_from_file(
v.file.string = NULL,
c.file.type,
c.path = NULL,
b.exact.match = FALSE,
c.file.string.exclude = NULL,
b.show.info = FALSE,
c.sheet.name = NULL,
n.skip.rows = 0,
c.delim = NULL,
b.col.names = TRUE,
l.col.type = NULL,
n.guess.max = 1000,
c.table.name = NULL,
c.show.report = "all",
b.add.mod.date.path.file = FALSE,
b.clean.up.header.names = TRUE
)
v.file.string |
String to search for in the filename. In case of Google Sheet this can be kept NULL (default: NULL). |
c.file.type |
Options: 'xls', 'csv', 'tsv', 'txt', 'delim', 'rds', 'fst', 'xml', 'parquet', 'sqlite', 'shp', 'dbf', 'gs' |
c.path |
Path where file should be searched for (default: NULL). |
b.exact.match |
Exact match or not (default: FALSE). |
c.file.string.exclude |
Means to filter out files by providing a string that should not exist in the filename (default: NULL). |
b.show.info |
Should we show info? (default: FALSE). |
c.sheet.name |
In case of xls (default: NULL). |
n.skip.rows |
In case of xls (default: 0). |
c.delim |
In case of txt, csv, delim (default: NULL). |
b.col.names |
Do the data contain header names? (default: TRUE). |
l.col.type |
List with column types, see also Details (default: NULL). |
n.guess.max |
Number of rows to check on data type (default: 1000). |
c.table.name |
In case of SQLITE (default: NULL). |
c.show.report |
Options: "none", "minimal", "all" (default: "all"). |
b.add.mod.date.path.file |
Should we add auxiliry features: mod.date, path.file? (default: FALSE). |
b.clean.up.header.names |
Should we clean up the header names? (default: TRUE). |
In case of Excel file, l.col.type should consist of list of: "skip", "guess", "logical", "numeric", "date", "text" or "list". In case of delimited file, l.col.type should consist of list of: c = character, i = integer, n = number, d = double, l = logical, D = date, T = date time, t = time, ? = guess, or _/- to skip the column.
Data frame containing the data read from the file.
Pieter Overdevest
f_read_data_from_file(
v.file.string = "bord.allocation",
c.file.type = "xls",
c.path = path.data,
b.exact.match = FALSE,
c.file.string.exclude = NULL,
b.show.info = FALSE,
c.sheet.name = NULL,
n.skip.rows = 0,
c.delim = NULL,
b.col.names = TRUE,
l.col.type = NULL,
n.guess.max = 1000,
c.table.name = NULL,
c.show.report = "all",
b.add.mod.date.path.file = FALSE,
b.clean.up.header.names = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.