write_ts {tstools}R Documentation

Export a list of time series to a file.

Description

Export a list of time series to a file.

Usage

write_ts(
  tl,
  fname = NULL,
  format = "csv",
  date_format = NULL,
  timestamp_to_fn = FALSE,
  round_digits = NULL,
  rdata_varname = "tslist",
  ...
)

Arguments

tl

list of time series

fname

character file name. Defaults to NULL, displaying output on console. Set a file name without file extension in order to store a file. Default file names / location are not CRAN compliant which is why the file name defaults to NULL.

format

character denotes export formats. Defaults to .csv. "csv", "xlsx", "json", "rdata" are available. Spreadsheet formats like csv allow for further optional parameters.

date_format

character denotes the date format. Defaults to NULL. If set to null the default is used: Jan 2010.

timestamp_to_fn

If TRUE, the current date will be appended to the file name. Defaults to FALSE.

round_digits

integer, precision in digits.

rdata_varname

character name of the list of time series within the store RData. Defaults to "tslist".

...

additional arguments used by spedific formats.

Details

Additional arguments covered by ...

Name Effect Format(s)
wide Export data in a wide format (one column per series) CSV, XLSX
transpose Transpose exported data (one row per series) CSV, XLSX, only if wide = TRUE
zip If set to TRUE, the file is compressed into a zip archive after export any

[Package tstools version 0.4.3 Index]