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

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Feb 21 10:20:46 CET 2005


On Mon, 21 Feb 2005, Bernhard Bruemmer wrote:

> Peter Dalgaard <p.dalgaard at biostat.ku.dk> writes:
>
>> Don MacQueen <macq at llnl.gov> writes:
>>
>>> 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?

It is specifically not required for R at runtime: see the `Writing R 
Extensions' manual.

> 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 at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list