Hello all! I was wondering if there is a way to pickle an R object into a file like it is possible in python? Such as you have an complicated R object(not a dataframe) , you use a function to write it to a file and than you have a function where you can retrieve the object from that file later on. Thanks Christoph
On 4/02/2010, at 12:09 PM, mkna005 mkna005 wrote:> Hello all! > I was wondering if there is a way to pickle an R object into a file > like it is possible in python? Such as you have an complicated R > object(not a dataframe) , you use a function to write it to a file and > than you have a function where you can retrieve the object from that > file later on.?dput ?dget cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
Perhaps you are looking for ?serialize. Best, G?bor On Thu, Feb 4, 2010 at 12:09 AM, mkna005 mkna005 <mkna005 at aucklanduni.ac.nz> wrote:> Hello all! > I was wondering if there is a way to pickle an R object into a file > like it is possible in python? Such as you have an complicated R > object(not a dataframe) , you use a function to write it to a file and > than you have a function where you can retrieve the object from that > file later on. > > Thanks > > Christoph > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Gabor Csardi <Gabor.Csardi at unil.ch> UNIL DGM
Hi, On Wed, Feb 3, 2010 at 6:11 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:> > On 4/02/2010, at 12:09 PM, mkna005 mkna005 wrote: > >> Hello all! >> I was wondering if there is a way to pickle an R object into a file >> like it is possible in python? Such as you have an complicated R >> object(not a dataframe) , you use a function to write it to a file and >> than you have a function where you can retrieve the object from that >> file later on. > > ?dput > ?dgetThose functions objects in an ASCII format. To save things in a binary format, see also: ?save ?load -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact