| save_delta | R Documentation |
This function saves a Delta dataset object to disk as three plain text files: "chars", "items", and "specs" in the DELTA format.
save_delta(delta, dir, prefix = "", overwrite = FALSE, width = 79)
delta |
A Delta dataset object (Rcpp_DeltaParser from load_delta()) |
dir |
Path to the directory where files should be saved. This argument
is required: the function never writes to the current working directory by
default. Use |
prefix |
Optional prefix for filenames (default: "") |
overwrite |
Whether to overwrite existing files (default: FALSE) |
width |
Maximum line width for output files (default: 79, range: 40-132) |
Invisibly returns the input delta object
try({
delta <- load_delta(
system.file("extdata", "chars_viola", package = "RDelta"),
system.file("extdata", "items_viola", package = "RDelta"),
system.file("extdata", "specs_viola", package = "RDelta")
)
# Write to a temporary directory
save_delta(delta, dir = tempdir())
# Write to a user-chosen directory with a prefix
save_delta(delta, dir = tempdir(), prefix = "my_", overwrite = TRUE)
# Use a wider output width
save_delta(delta, dir = tempdir(), width = 120)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.