[R] pasting results into Word/Excel

Gabor Grothendieck ggrothendieck at myway.com
Sun Apr 11 20:04:36 CEST 2004


Graham M Smith <graham.smith <at> myotis.co.uk> writes:

: Is there some clever way of pasting results from R into Excel or Word, as 
: tab limited format so they are easy to turn into a formatted table.


Try this:

   data(iris)   # get a test data frame
   require(R2HTML)
   HTML( iris, file("clipboard","w"), append=F )   

Now go to Excel and press ctrl-V to paste it in.
Once its in Excel you can copy and paste from there to Word.




More information about the R-help mailing list