[R] How to translate a dataframe into the R code that makes that dataframe?

Gabor Grothendieck ggrothendieck at gmail.com
Wed Jun 17 16:50:17 CEST 2009


See

?dump
?dput

On Wed, Jun 17, 2009 at 10:43 AM, Mark Na<mtb954 at gmail.com> wrote:
> Hi,
>
> I am helping another R user (off list) and I would like to email her
> an R script containing the data she needs and the code to solve her
> problem. I have made a small dummy dataset, but instead of sending her
> a CSV I would prefer to send the data embedded in the script, so there
> would be a like in the script like:
>
> my.df<-c( etc, etc, etc
>
> I have made the dataframe (in a spreadsheet) and imported it into R
> (using read.csv) and now I wonder if there is a function to produce
> the code that makes that dataframe.
>
> Thanks for any help you can provide.
>
> Mark Na
>
> ______________________________________________
> 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.
>




More information about the R-help mailing list