write.table()
, see the details section.
export(x, file = "", ...)
write.table()
write.table()
is to add a blank column name for the row names,
but (despite it is the convention used for CSV files to be read by spreadsheets) that doesn't
always work with all spreadsheets or other programs that attempt to import the result of
write.table()
.This function acts as if write.table()
was called, with only one difference: if row names
are present in the dataframe (i.e. any of them should be different from the default row numbers),
the final result will display a new column called cases
in the first position, except the
situation that another column called cases
already exists in the data, when the row names
will be completely ignored.
If not otherwise specified, an argument sep = ","
is added by default.
The argument row.names
is set to FALSE by default, since a new column is added anyways if possible.
Since this function pipes everything to write.table()
anyway, the argument file
can also be a connection open for writing. ""
indicates output to the console.