From the course: Learning the R Tidyverse

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Export .rdata objects for later

Export .rdata objects for later - R Tutorial

From the course: Learning the R Tidyverse

Start my 1-month free trial

Export .rdata objects for later

- [Announcer] Sometimes R objects can become quite complex. For instance, you may have a data frame which has been grouped and sorted using the tidyverse and this information is crucial to the representation of the data, at least so that it can be easily reused by other functions. Other examples of complex objects are geospatial data sets. For instance, an object containing the shape files of a number of different countries. Exporting these objects as flat files (i.e. as CSV files or tab separated files) will lose this important data and are therefore inappropriate data files for this kind of data. In these cases, it's efficient to store the object directly as a .rdata file which contains the true R representation of the object so that when it's loaded back into R, you have exactly the same object you exported. However, because this is a special file only R knows how to read, you should ensure that you keep your reproducible workflow to generate that .rdata file in your data-raw…

Contents