delim_record_spec {tfdatasets} | R Documentation |
Specification for reading a record from a text file with delimited values
Description
Specification for reading a record from a text file with delimited values
Usage
delim_record_spec(
example_file,
delim = ",",
skip = 0,
names = NULL,
types = NULL,
defaults = NULL
)
csv_record_spec(
example_file,
skip = 0,
names = NULL,
types = NULL,
defaults = NULL
)
tsv_record_spec(
example_file,
skip = 0,
names = NULL,
types = NULL,
defaults = NULL
)
Arguments
example_file |
File that provides an example of the records to be read. If you don't explicitly specify names and types (or defaults) then this file will be read to generate default values. |
delim |
Character delimiter to separate fields in a record (defaults to ",") |
skip |
Number of lines to skip before reading data. Note that if
|
names |
Character vector with column names (or If If |
types |
Column types. If Types can be explicitliy specified in a character vector as "integer",
"double", and "character" (e.g. Alternatively, you can use a compact string representation where each
character represents one column: c = character, i = integer, d = double
(e.g. |
defaults |
List of default values which are used when data is
missing from a record (e.g. |