[Rd] S4 data dump or?
Paul Gilbert
pgilbert at bank-banque-canada.ca
Tue Mar 3 17:59:42 CET 2009
Prof Brian Ripley wrote:
> On Mon, 2 Mar 2009, Paul Gilbert wrote:
>
>> I am trying to dump some data in a file that I will add to a package.
>> The data has an attribute which is a S4 object, and this seems to
>> cause problems. What is the preferred way to write a file with a
>> dataset that has some S4 parts, so that it can be included in a package?
>
>
> Using save() seems almost always preferable to dump(): usually a smaller
> result, avoids representation error changes for numeric types and
> encoding issues for some character vectors, works for almost all objects.
Ok. I thought I was having a problem with save()/load() too, but it
seems that problem was something else. I have this working now.
>
> I am guessing that the note on ?dump about objects of type S4 is the
> issue here.
Yes, the S4 object causes source() of the dump()ed file to fail.
Thanks,
Paul
>
>> Paul Gilbert
>
>
====================================================================================
La version française suit le texte anglais.
------------------------------------------------------------------------------------
This email may contain privileged and/or confidential information, and the Bank of
Canada does not waive any related rights. Any distribution, use, or copying of this
email or the information it contains by other than the intended recipient is
unauthorized. If you received this email in error please delete it immediately from
your system and notify the sender promptly by email that you have done so.
------------------------------------------------------------------------------------
Le présent courriel peut contenir de l'information privilégiée ou confidentielle.
La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute diffusion,
utilisation ou copie de ce courriel ou des renseignements qu'il contient par une
personne autre que le ou les destinataires désignés est interdite. Si vous recevez
ce courriel par erreur, veuillez le supprimer immédiatement et envoyer sans délai à
l'expéditeur un message électronique pour l'aviser que vous avez éliminé de votre
ordinateur toute copie du courriel reçu.
More information about the R-devel
mailing list