Introduction
R, the statistics language, saves its objects
in a serialisation of its own. An .rds file, written by
saveRDS, holds one object; an .rda or .RData
file, written by save, holds a named collection such as a workspace.
Structure
Binary files made by save begin with a short header line such as
RDX2; saveRDS output has no such line. The serialised data
starts with a format letter: X for big-endian XDR, A for text
or B for the machine’s own byte order. Version 3 of the serialisation has
been the default since R 3.5.0; version 2 came before it. Files are gzip-compressed by
default, and R also reads bzip2 and xz.
Not described
This page is a first outline. The details of the layout are not yet described here.
Known, not yet covered
- Reference: the object types and attributes, which the R Internals manual and R’s source describe.
- Viewer: the site has no viewer for this format.
Links
Software
- R – language and environment for statistics
Reference
- R Internals – the manual’s section on serialisation formats