[R] Requery: R 1.0.0 for Win95 and clipboard
Guido Masarotto
guido at sirio.stat.unipd.it
Thu Mar 23 13:36:34 CET 2000
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list