In the previous section, we learned how to import data from external files. Now, there will be many instances where we would be keen to export data from R into suitable
foreign files. The need may arise in automated systems, reporting, and so on, where the other software requires making good use of the R output.
The basic R function that exports data is
write.table, which is not surprising as we saw the utility of the
read.table function. The following screenshot gives a snippet of the
write.table function. While reading, we assign the imported file to an R object, and when exporting, we first specify the R object and then mention the filename. By default, R assigns row names while exporting the object. ...