X11 copy & paste (was: Re: [R] Easy cut & paste from Excel to R?)
Bernhard Bruemmer
bbruemmer at web.de
Mon Feb 21 09:57:49 CET 2005
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? 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
More information about the R-help
mailing list