as.csv {csv} | R Documentation |
Read or Write CSV Using Selected Conventions
Description
Reads or writes CSV files in a conventional way.
Generic, with methods for character and data.frame.
A length-one character argument is treated as a
filepath and tries to return a data.frame.
A data.frame argument is written to the specified
filepath. Typically, quote
and row.names
are FALSE and na
is ".". When reading, white
space and empty strings are treated as NA, and strip.white
is TRUE. When writing, values with commas or
double-quotes are double-quoted (and embedded double-quotes are doubled).
Usage
as.csv(x, ...)
Arguments
x |
object |
... |
passed arguments |
See Also
as.csv.character
, as.csv.data.frame
Other as.csv:
as.csv.character()
,
as.csv.data.frame()
Examples
data <- head(Theoph)
filepath <- file.path(tempdir(),'theoph.csv')
as.csv(data,filepath)
as.csv(filepath)
[Package csv version 0.6.2 Index]