View source: R/tabular_write.R
| tabular_write | R Documentation |
A wrapper function to write data frames to different file formats
tabular_write(object, path, format)
object |
A data frame to write |
path |
Character string specifying the output file path |
format |
Character string specifying the format: "delim", "xlsx", "csv", "csv2", "tsv", "sav", "dta" |
Invisibly returns TRUE on success, used for side effects
data <- data.frame(x = 1:3, y = letters[1:3])
# Write as CSV
tabular_write(data, tempfile(fileext = ".csv"), format = "csv")
# Write as Excel
tabular_write(data, tempfile(fileext = ".xlsx"), format = "xlsx")
# Write as SPSS
tabular_write(data, tempfile(fileext = ".sav"), format = "sav")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.