add2csv | R Documentation |
Create or append a data.frame to a csv file. Column names are added at creation and ignored at the append steps.
add2csv(x, file = "results.csv", dir = ".")
x |
a data.frame or a matrix. |
file |
character. The filename. |
dir |
character. The directory in which the file is written.
Default value |
Nothing in the console. A csv file on the disk.
results_csv <- tempfile("results", fileext = ".csv")
x <- data.frame(a = 1:3, b = 4:6)
add2csv(x, file = results_csv)
add2csv(x*10, file = results_csv)
add2csv(x*100, file = results_csv)
read.csv(file = results_csv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.