[R] pasting results into Word/Excel

Anders Nielsen anielsen at math.ku.dk
Sun Apr 11 17:08:36 CEST 2004


Hi Graham,

If you want it in excel I suggest you export it as a comma separated
file, which can be done with something like:

> data(airquality)
> write.table(airquality, sep=",", row.names=FALSE, quote=FALSE, file="result.csv")

This file will open nicely in excel.

If you want it as tab separated use the same, but with 'sep="\t"'.

Cheers,

Anders.

On Sun, 11 Apr 2004, Graham M Smith wrote:

> 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.
>
> Or is there some other way of doing this to avoid the time spent
> reformatting the output for presentation.
>
> If different, I am also interested in an answer to the same question but
> using S-Plus.
>
> Many thanks,
>
> Graham
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>




More information about the R-help mailing list