[R] a clipboard problem while using R2HTML

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu May 4 08:53:20 CEST 2006


See ?file, which says

      'file' can also be used with 'description = "clipboard"' in mode
      '"r"' only. ...

on Unix-alikes.  (This is different on Windows, where the clipboard is an 
OS service, not part of the X11 addon.)

On Thu, 4 May 2006, Frank Liu wrote:

> I followed the examples of previous posts about R2HTML to practice

You don't give any references here: they were probably refering to 
Windows.

> exporting a data to a clipboard, but the result is not as smooth as I
> had expected:
>
> library(R2HTML)
> data(iris)
> HTML(iris, file("clipboard","w"), append=FALSE)
>
> I got an error message:
> > HTML(iris, file("clipboard","w"), append=FALSE)
> Error in file("clipboard", "w") : 'mode' for the clipboard must be 'r'
> on Unix
>
> I changed w to r, but there seems a clipboard problem:

The `problem' is your not reading the documentation.

> > HTML(iris, file("clipboard","r"), append=FALSE)
> Error: clipboard connection is open for reading only
>
> The only setting about the clipboard is in my .emacs is:
>  '(x-select-enable-clipboard t))
>
> Thank you in advance for any hint.
> I am using Linux Fedora 4. Kernel 2.6.15-1.1833_1.
> R version 2.3.0, ESS 5.3.0.

-- 
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