as.csv.data.frame | R Documentation |
Saves a data.frame as CSV, using selected conventions.
## S3 method for class 'data.frame' as.csv(x, file, na = ".", quote = FALSE, auto = !quote, row.names = FALSE, ...)
x |
data.frame |
file |
passed to |
na |
passed to |
quote |
passed to |
auto |
double-quote column names and row values with embedded commas or double-quotes; the latter are escaped by doubling them |
row.names |
passed to |
... |
passed to |
invisible data.frame (x)
Other as.csv:
as.csv.character()
,
as.csv()
x <- data.frame( check.names = FALSE, stringsAsFactors = TRUE, person = 1:3, `name, suffix` = c("Bill Smith", 'Joseph "Joe" Hancock', "Mary Laguire, DDS") ) file <- tempfile() as.csv(x,file) y <- as.csv(file,as.is=FALSE) attr(y,'source') attr(y,'source') <- NULL x y stopifnot(identical(x,y))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.