[R] Dump the "source code" of data frame
jim holtman
jholtman at gmail.com
Mon Apr 18 01:45:39 CEST 2011
If you want to save it so that you can read it back later, then look
at 'save' and 'load'.
On Wed, Apr 13, 2011 at 3:09 AM, C.H. <chainsawtiney at gmail.com> wrote:
> Dear R experts,
>
> I remember a similar function existed and have been mentioned in
> R-help before. I tried my best to search but I really can't find it
> out.
>
> suppose I have an data frame like this:
>
>> somedata <- data.frame(age.min = 1, age.max = 1.5, male = TRUE, l = -1.013, m=16.133, s=0.07656)
>
> In order to back up the data and I don't want to use write.table(), I
> would like to back up the "source code" of the data frame. When I
> apply that function (let's call it dumpdf() ), the function will
> reproduce the "source code" that creates the data.frame. For example:
>
>> dumpdf(somedata)
> somedata <- data.frame(age.min = 1, age.max = 1.5, male = TRUE, l =
> -1.013, m=16.133, s=0.07656)
>
> Is there any function similar to the dumpdf() above?
>
> Thank you so much!
>
> Regards,
>
> CH
>
> --
> CH Chan
>
> ______________________________________________
> 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.
>
--
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
More information about the R-help
mailing list