[R] Shortcut for dev.copy2eps

Prof Brian D Ripley ripley at stats.ox.ac.uk
Thu Dec 21 08:43:03 CET 2000


On Wed, 20 Dec 2000, Peter Kleiweg wrote:

> 
> I want to use a shortcut for copying figures to EPS. I defined
> this function in .Rprofile:
> 
>     ps <- function(file="Rplot.eps", width=7, height=7, ...) {
>         dev.copy2eps(file=file, width=width, height=height, ...)
>     }
> 
> This doesn't work:
> 
>     > data(cars)
>     > plot(cars)
>     > ps()
>     Error in device(...) : Object "width" not found
> 
> Can anyone tell me what's going on?
> 
> I'm using R version 1.1.0 on Linux.
                      ^^^^^

That's what is going on.  NEWS for 1.1.1 has

    o   dev.print() and dev.copy2eps() now work when called from a
        function, such as dev2bitmap().

Plese upgrade, and especially upgrade from 1.x.0 to 1.x.1 when the latter
becomes available.

Your example works fine in R 1.2.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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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