[R] Transfer Crosstable to Word-Document

Philippe Grosjean phgrosjean at sciviews.org
Thu Feb 21 11:40:40 CET 2008


bartjoosen wrote:
> 
> 
> Greg Snow-2 wrote:
>> ....
>>> write.table(my.data, 'clipboard', sep="\t")
>> Then in Excel just do a paste and the data is there, this saves a couple
>> of steps from saving as a .csv file and importing that into excel.  This
>> would probably be fine for a few tables.
>>
>> ....
>>
> 
> Just to inform: 
> 
> if you use write.table(my.data,'whateverfile.xls',sep="\t", quote=FALSE),
> you can open this file right from the windows explorer as a normal excel
> file.
> If you're already running excel and choose file>open, you will get a dialog
> box, where you have to click complete or OK.
> 
> 
> Bart

Yes, but it is a very bad practice to name a file with .xls extension 
that is not in Excel file format (here, a tab-separated ASCII file)!
Best,

Philippe Grosjean



More information about the R-help mailing list