Noone answered so I guess this is not possible, but can anyone definitely put me out of my misery... 'I have just begun using R 1.0.0 for Win95. Can someone please tell me how to put a data frame on the clipboard, and how to read data into a data frame from the clipboard.' Is this something that's planned? The clipboard seems pretty fundamental to Windows (and other OS?). Thanks Ursula Kellett Brisbane Australia -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Ursula Kellett <u.kellett at qut.edu.au> writes:> Noone answered so I guess this is not possible, but can anyone definitely put > me out of my misery... > > 'I have just begun using R 1.0.0 for Win95. Can someone please tell me how to > put a data frame on the clipboard, and how to read data into a data frame > from the clipboard.' > > Is this something that's planned? The clipboard seems pretty fundamental to > Windows (and other OS?).The short answer is "no", but most people in the developer crowd come from a Unix background, so there may be some useful techniques we just don't know about. Some work has been done on communication with Excel and using (D)COM. Counterquestion: How would you expect it to work? What would you do with it once it was on the clipboard and how would you ensure that data contained the relevant information (factor levels, e.g.) when read from the clipboard? What are the relevant communication channels? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi Ursula, I don?t use Windows anymore, but I?think it isn?t possible. But maybe this helps you: To paste a dataframe to the Win-clipboard, just print the dataframe in R (asume its name as my_data)> my_dataNow you can mark it with your mouse, type Contr+C to paste it to the clippboard. To read data from the clippboard, you must save it to a file, e.g. use the Notepad editor and paste the data to its sheet. Save the file and use the read.table-function in R to read the data from the file. bye, Sven Ursula Kellett wrote:> > Noone answered so I guess this is not possible, but can anyone definitely put > me out of my misery... > > 'I have just begun using R 1.0.0 for Win95. Can someone please tell me how to > put a data frame on the clipboard, and how to read data into a data frame > from the clipboard.' > > Is this something that's planned? The clipboard seems pretty fundamental to > Windows (and other OS?). > > Thanks > Ursula Kellett > Brisbane Australia > >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, Mar 23, 2000 at 03:22:39PM +1000, Ursula Kellett wrote:> Noone answered so I guess this is not possible, but can anyone definitely put > me out of my misery... > > 'I have just begun using R 1.0.0 for Win95. Can someone please tell me how to > put a data frame on the clipboard, and how to read data into a data frame > from the clipboard.'Only thing I now it is possible is to use 'scan'+paste. E.g., if the clipboard contains 1 2 3 4 5 6 and if, in the RGui console, you type something like > x<-scan() 1: then pasting the content of the clipboard (using, Ctrl-Y or the Edit|Paste menuitem or the Paste menu available with the mouse right button) and hitting <return>, let you to get the clipboard content in x,i.e., > x [1] 1 2 3 4 5 6 Then, you have to transform x in a data frame, e.g., using something like > data.frame(matrix(x,2,3,byrow=T)) X1 X2 X3 1 1 2 3 2 4 5 6> Is this something that's planned? The clipboard seems pretty fundamental to > Windows (and other OS?). >What kind of functionality are you thinking about? Something like having 'read.table.from.clipboard' or something more advanced? guido -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
zivan.karaman@limagrain.com
2000-Mar-23 13:21 UTC
[R] Requery: R 1.0.0 for Win95 and clipboard
The usual way of copying 2-dimensional arrays to and from the clipboard is to separate columns by <Tab> character, and to separate lines by <Newline> character (CR-LF under DOS/Windows). Potential problems (at least the three I can see immediately): dimnames, factors and NAs. I would suggest that including dimnames should be optional. I would assume that factors should be copied as.character(...) TO clipboard. When pasting FROM the clipboard, it would be nice to have an option for leaving the character vectors as text or transforming them into factors. (I often have to do a lot of gymnastics to transform factors into character vectors in dataframes with S+, and I really don't like it). The NAs could be represented by empty cell, i.e. <Tab><Tab>, for both copy and paste. In S-PLUS 2000, one can copy and paste data from the data editor, but it seems that the dimnames don't get copied. In fact, I think that the clipboard operations should work like read.table and write.table, except that under R , 'file="clipboard" ' apparently uses an internal clipboard, and not the standard Windows clipboard. With S-PLUS 2000, if you say write.table(x,file="clipboard",sep="\t") you can paste the data into Excel. You can also read data from Excel by read.table(file="clipboard",header=T,sep="\t") Best regards Zivan -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._