The best way to store R objects is to use R's own 'save()' and 'load ()' functions. In order to use these, it is necessary for the objects to be assigned to R names, so you would have something like...


        from rpy import r
        # code here to create objects 'a' and 'b'
        r.assign('a', a)
        r.assign('b', b)
        r("save(a,b, file='ab.Rdata')")
        

and then

        from rpy import r
        r("load(file='ab.Rdata')")
        a = r.a
        b = r.b

-Greg


On May 15, 2008, at 5:01AM , John Reid wrote:

Hi,

I know more about python than R and I'm wondering is there any pickling
support in rpy? If there isn't, is there any scope for providing some?
I've used r.dput a few times to persist some R objects but it would be
very useful if there was a more transparent way to do this.

Anyone got any thoughts or an implementation (hopefully)?

John.


---------------------------------------------------------------------- ---
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to