The Windows version of R has functions for reading from and writing to the clipboard. These can be used to move data back and forth between R and Windows applications such as Excel. However, there are a few gotchas. See the following link for details.
3 thoughts on “R, Excel, and the Windows clipboard”
Comments are closed.
It is much easier to use the xlsReadWrite package.
Thanks! I need to check that out. Maybe the clipboard functions would still be useful for working with programs other than Excel.
I second the xlsReadWrite recommendation, as long as you are sure that your scripts will only need to run on windows. If not, check the ‘R data import/export manual’. It has a paragraph on reading Excel files. Read it online: http://cran.r-project.org/doc/manuals/R-data.html#Reading-Excel-spreadsheets or under the help menu in the windows version.