TSwriteXLS {tframePlus} | R Documentation |
Write one or more time series to a .xls spreadsheet file
TSwriteXLS(x, ..., FileName="R.xls", SheetNames=NULL, verbose = FALSE)
x |
a time series or matrix of time series.) |
... |
additional time series objects (like x). |
FileName |
a string to use for the file name. |
SheetNames |
Logical indicating if NA should be removed from the beginning and end of a series |
verbose |
logical passed to WriteXLS. |
This functions uses WriteXLS
to write time series data to an .xls spreadsheet
file. If the object x
has mulitple series then they will be put on
the same sheet. Additional objects in ... will be put on additional pages.
If SheetNames
is NULL
(the default) then the sheet names will
be generated from the first series name in each object. If SheetNames
is supplied then it should have an element for x
and for each object
in ....
If WriteXLS
does not find a version of perl with appropriate modules
then a work around is attempted using save
.
logical
tofile <- tempfile() z <- ts(1:10, start=c(1999,2), freq=12) seriesNames(z) <- "ser 1" TSwriteXLS(z, FileName=tofile) zz <- tbind(z, diff(z)) seriesNames(zz) <- c("ser 1", "diff") TSwriteXLS(zz, FileName=tofile, SheetNames="2 series") zz <- ts(1:10, start=c(1999,1), freq=1) seriesNames(zz) <- "annual ser" TSwriteXLS(z, zz, FileName=tofile, SheetNames=c("monthly", "annual")) unlink(tofile)