From ripley at stats.ox.ac.uk  Mon Feb  7 22:51:04 2011
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 7 Feb 2011 21:51:04 +0000 (GMT)
Subject: [Rd] Save and serialize
In-Reply-To: <AANLkTimQe8suNsPmVryHfNZp1YLFk=RYenFfvn9bh24_@mail.gmail.com>
References: <AANLkTimQe8suNsPmVryHfNZp1YLFk=RYenFfvn9bh24_@mail.gmail.com>
Message-ID: <alpine.LFD.2.02.1102072144470.25585@gannet.stats.ox.ac.uk>

On Mon, 7 Feb 2011, Hadley Wickham wrote:

> Hi all,
>
> Is there any relationship between save and serialize?  Do they use the
> same algorithm?

See the R-internals manual: there is more info in the R-devel version, 
not least because saveRDS() is added to the mix.

But basically serialize() and saveRDS() use the same format, and 
save() writes a header and then serializes a pairlist of the objects 
given.

'The same algorithm' is somewhat misleading here: strictly no, as they 
manage to use four entry points to the code base.

>
> Hadley
>
> -- 
> Assistant Professor / Dobelman Family Junior Chair
> Department of Statistics / Rice University
> http://had.co.nz/
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] Save and serialize
Prof Brian Ripley