Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

X11 copy & paste (was: Re: [R] Easy cut & paste from Excel to R?)

Bernhard Bruemmer

2005-02-21

Replies:

Peter Dalgaard <p.dalgaard@(protected):

> Don MacQueen <macq@(protected):
>
>> I tried Ken's suggestion read.table(pipe("pbpaste"),header=TRUE) on
>> my Mac OS X system and it worked *without* generating any warning
>> message.
>>
>> If my experience represents the norm, and Ken's is the exception, it
>> is so simple that no further contribution to R is needed, I would
>> say. Thank you, Ken.
>
> My conjecture is that it only happens when there are fewer than 5 data
> lines.
>
> We still need to sort out X11. Too bad that the xclip program isn't
> ubiquitous.

Does Perl qualify as ubiquitous? If so, the piped xclip call can be
substituted for by the following:

data <- read.delim(pipe("perl -MTk -e 'print MainWindow->new->SelectionGet'"))

Works fine under Linux.

HTH, Bernhard

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.