Exporting Any File from R

Use the R function cat to write out a text file just as the data is in R.

Use the R function dput to write out a file so that it can be directly read using the R function dget.


Transcript

Not only can we import files, but we can also output files; it has a function "cat," so we can simply write to a text file - just as we can update the data to the screen. There's also a dput file so you can put it into a file directly, and then we can get the data that we just output using dput back in by using the dget function.