Write a matrix or Time Indexed Series to a .csv file that can be imported into a spreadsheet.
csv(z, file = "", noDates = FALSE, row.names = !is.tis(z), ...)
matrix or tis
object
either a character string naming a file or a connection. If
""
, a file name is constructed by deparsing z
. The
extension ".csv" is appended to the file name if it is not already there.
logical. If FALSE
(the default) and z
is a tis
object, the first column of the output file will contain spreadsheet
dates.
either a logical value indicating whether the row names of
z
are to be written along with z
, or a character vector
of row names to be written. If FALSE
(the default) and
z
is a tis
object, the first column of the
output file will contain spreadsheet dates.
other arguments passed on to write.table
.
csv
returns whatever the call to write.table
returned.
csv
is essentially a convenient way to call write.table
.
If file
is not a connection, a file name with the ".csv"
extension is constructed. Next, a column of spreadsheet dates is
prepended to z
if necessary, and then csv
calls
write.table(z, file = filename, sep = ",", row.names = !is.tis(z), ...)