sm_write_excel {samadb} | R Documentation |
Export Wide Data to Excel
Description
This function exports a wide format dataset to a column- (default) or row-oriented Excel format.
Usage
sm_write_excel(
data,
...,
transpose = FALSE,
transpose.date.format = "%d/%m/%Y"
)
Arguments
data |
a wide dataset from |
... |
further arguments to |
transpose |
logical. If |
transpose.date.format |
argument passed to |
Value
Writes an Excel file to the specified path (no return value).
See Also
sm_transpose
, write_xlsx
, samadb
Examples
## Not run:
# Getting electricity indicators from 2000
data <- sm_data("ELECTRICITY", from = 2000)
# Saving to different Excel formats
sm_write_excel(data, "ELECTRICITY.xlsx")
sm_write_excel(data, "ELECTRICITY.xlsx", transpose = TRUE)
# Saving to alternative path
sm_write_excel(data, "C:/Users/.../ELECTRICITY.xlsx")
## End(Not run)
[Package samadb version 0.3.0 Index]