9.3 Read RData Files

After reading in the raw data, as in a csv file, you do work, like creating new variables or modifying the ones that you have. While you can recreate this work by re-running your code, it is much easier to save your workspace in a *.RData file, especially if you have made a lot of changes/additions to the raw data.

The workspace represents your work. The *.RData file has the original data plus any changes that you made.

The easiest way to load the data into R is to double-click on the particular file yourfile.RData after you download it to your computer. This will open in RStudio only if you have associated the .RData files with RStudio. Otherwise the file will open in R.

To change your file associations, please see Change File Associations in Windows or Change File Associations in Mac.

You may want to set your working directory to where you stored the RData file..

These *.RData files are read into R with a load() statement, rather than a read statement.


If you type ls() again, you can see that your data frame is showing up as in the workspace. The information can also be seen in the Environment Window.