| write_symbolic_csv | R Documentation |
Writes a symbolic data object (interval, histogram, modal, or any
data frame) to a CSV file. Interval data stored in RSDA format
(symbolic_tbl with complex columns) is automatically converted to
MM format (paired _min/_max columns) before writing.
write_symbolic_csv(
x,
file,
sep = ",",
row.names = TRUE,
na = "NA",
quote = TRUE,
...
)
x |
A |
file |
Path to the output CSV file. |
sep |
Field separator character. Default |
row.names |
Logical or character. If |
na |
Character string to use for missing values. Default |
quote |
Logical; should character and factor columns be quoted?
Default |
... |
Additional arguments passed to |
write_symbolic_csv handles every tabular symbolic type stored in
dataSDA:
Interval (RSDA): symbolic_tbl objects with complex
interval columns are converted to MM format before writing.
Interval (MM): Data frames with _min/_max
columns are written directly.
Histogram / Modal / Other: Plain data frames are written directly.
The output is a standard CSV that can be read back with
read_symbolic_csv.
Invisibly returns the data frame that was written (after any conversion).
read_symbolic_csv
# Interval data (RSDA symbolic_tbl)
data(mushroom.int)
tmp <- tempfile(fileext = ".csv")
write_symbolic_csv(mushroom.int, tmp)
cat(readLines(tmp, n = 3), sep = "\n")
# Histogram data
data(airline_flights.hist)
tmp2 <- tempfile(fileext = ".csv")
write_symbolic_csv(airline_flights.hist, tmp2)
cat(readLines(tmp2, n = 3), sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.