Utility functions to read and write CSV files in the format required by inferno
Arguments
- x
the object to be written, preferably a matrix or data frame. If not, it is attempted to coerce
x
to a data frame. Seewrite.table
.- file
either a character string naming a file or a connection open for writing or reading. See
write.table
andread.table
.- ...
Other parameters to be passed to
write.table
orread.table
.
Details
The functions of the inferno package accept CSV files formatted as follows:
Decimal values should be separated by a dot; no comma should be used to separate thousands etc. Example:
86342.75
.Character and names should be quoted in single or double quotes. Example:
"female"
.Values should be separated by commas, not by tabs or semicolons.
Missing values should be simply empty, not denoted by "NA", "missing", "-", or similar.
Preferably there should not be
factor
s; use character names instead.
The utility functions write.csvi()
and read.csvi()
are wrappers to write.table
or read.table
that sets appropriate default parameters