R allows you to export datasets from the R workspace to the CSV and tab-delimited file formats. To export a dataset named dataset to a CSV file, use the write.csv function. For example, to export the Puromycin dataset (included with R) to a file names puromycin_data.csv, use the command: