read_log {readr} | R Documentation |
This is a fairly standard format for log files - it uses both quotes and square brackets for quoting, and there may be literal quotes embedded in a quoted string. The dash, "-", is used for missing values.
read_log(file, col_names = FALSE, col_types = NULL, skip = 0, n_max = Inf, progress = show_progress())
file |
Either a path to a file, a connection, or literal data (either a single string or a raw vector). Files ending in Literal data is most useful for examples and tests. It must contain at least one new line to be recognised as data (instead of a path). |
col_names |
Either If If Missing ( |
col_types |
One of If If a column specification created by Alternatively, you can use a compact string representation where each
character represents one column:
c = character, i = integer, n = number, d = double,
l = logical, D = date, T = date time, t = time, ? = guess, or
|
skip |
Number of lines to skip before reading data. |
n_max |
Maximum number of records to read. |
progress |
Display a progress bar? By default it will only display
in an interactive session and not while knitting a document. The display
is updated every 50,000 values and will only display if estimated reading
time is 5 seconds or more. The automatic progress bar can be disabled by
setting option |
read_log(readr_example("example.log"))