| dbc_to_csv | R Documentation |
Decompresses a .dbc file and writes a UTF-8 CSV to disk.
Records are processed in batches, so peak RAM usage is
O(batch_size * record_width) regardless of file size.
dbc_to_csv(
input_file,
output_file,
batch_size = 4096L,
encoding = NULL,
cols = NULL,
verbose = FALSE,
progress = NULL,
...
)
input_file |
Character string. Path to the source |
output_file |
Character string. Path for the output |
batch_size |
Integer |
encoding |
Character string or |
cols |
Character vector or |
verbose |
Logical. If |
progress |
Function or |
... |
Optional internal arguments. |
The output CSV is prefixed with a UTF-8 BOM so that Microsoft Excel opens it with correct encoding without additional configuration.
TRUE invisibly on success. On failure, stops with a
descriptive error message.
dbc2dbf, dbc_inspect
dbc <- system.file("extdata", "sids.dbc", package = "dbcturbo")
csv <- tempfile(fileext = ".csv")
dbc_to_csv(dbc, csv)
head(utils::read.csv(csv, fileEncoding = "UTF-8"))
unlink(csv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.