From pgilbert at bank-banque-canada.ca  Tue Mar  3 17:59:42 2009
From: pgilbert at bank-banque-canada.ca (Paul Gilbert)
Date: Tue, 03 Mar 2009 11:59:42 -0500
Subject: [Rd] S4 data dump or?
In-Reply-To: <alpine.OSX.1.00.0903030714540.53034@tystie.local>
References: <49AC56E8.50502@bank-banque-canada.ca>
	<alpine.OSX.1.00.0903030714540.53034@tystie.local>
Message-ID: <49AD61FE.5030409@bank-banque-canada.ca>


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.


[Rd] S4 data dump or?
Paul Gilbert