Dear all, I was wonderin how to copy data from an Excel sheet to the R prompt. For a single culumn it works to select the data in Excel, copy to the clipboard with ctrl-c and to use in R: ------- x<-scan() [paste data with ctrl-v (paste)] [ctrl-z, to end input] ------- But with multiple columns Excels tabs are "eaten" by the R-promt, and the numbers concatenated without separator. Is there a handy method for this? Thanks, Gerrit. -- Gerrit Draisma Department of Public Health Erasmus MC, University Medical Center Rotterdam Room AE-103 P.O. Box 2040 3000 CA Rotterdam The Netherlands Phone: +31 10 7043124 Fax: +31 10 010-7038474 mgzlx4.erasmusmc.nl/pwp/?gdraisma
Use read.delim("clipboard") Uwe Ligges G. Draisma wrote:> Dear all, > I was wonderin how to copy data from an Excel sheet > to the R prompt. > > For a single culumn it works > to select the data in Excel, > copy to the clipboard with ctrl-c > and to use in R: > ------- > x<-scan() > [paste data with ctrl-v (paste)] > [ctrl-z, to end input] > ------- > > But with multiple columns Excels tabs > are "eaten" by the R-promt, and > the numbers concatenated without separator. > > Is there a handy method for this? > > Thanks, > Gerrit. > >