| dbc_batch_to_csv | R Documentation |
Finds DBC files in a directory and converts each one with
dbc_to_csv. When recursive = TRUE, the relative
directory layout beneath input_dir is preserved in
output_dir. Existing output files are never replaced unless
overwrite = TRUE.
dbc_batch_to_csv(
input_dir,
output_dir,
pattern = "\\.dbc$",
recursive = FALSE,
batch_size = 4096L,
encoding = NULL,
cols = NULL,
overwrite = FALSE,
verbose = FALSE,
workers = 1L
)
input_dir |
Character string. Directory containing DBC files. |
output_dir |
Character string. Destination directory for CSV files. Created when it does not exist. |
pattern |
Regular expression used to select input files. Defaults to
|
recursive |
Logical. Search subdirectories? Default |
batch_size |
Integer. Number of records per CSV write batch. Passed to
|
encoding |
Character string or |
cols |
Character vector or |
overwrite |
Logical. Replace existing CSV files? Default |
verbose |
Logical. Print per-file conversion progress? Default
|
workers |
Positive integer. Number of files to convert concurrently on
macOS and Linux. Defaults to |
A data frame with one row per converted file and columns
input_file and output_file. For an empty input directory,
returns a zero-row data frame with those columns.
input_dir <- tempfile("dbc-input-")
output_dir <- tempfile("dbc-output-")
dir.create(input_dir)
file.copy(system.file("extdata", "sids.dbc", package = "dbcturbo"),
file.path(input_dir, "sids.dbc"))
result <- dbc_batch_to_csv(input_dir, output_dir)
result
unlink(c(input_dir, output_dir), recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.