[R] postscript problem in 1.1.0

Prof Brian D Ripley ripley at stats.ox.ac.uk
Wed Jun 21 20:29:24 CEST 2000


On Wed, 21 Jun 2000, Matthew Wiener wrote:

> Hi.
> 
> I just compiled R 1.1.0 on a Xeon machine running Linux.  When I try to
> open a postscript file, I get the error 
> 
> Error in old$command == "default" : comparison (1) is possible only for
> vector types
> 
> The offending line seems to be 
> 
>     if (old$command == "default") 
>         old$command <- if (!is.null(cmd <- getOption("printcmd"))) 
>             cmd
>     else "" 
> 
> which has been added since 1.0.1. 
> 
> The problem seems to be that old has no component named command. 
> ps.options doesn't return any such component, nor will it allow any such
> component to be set, even with override.check = T.  And removing the lines
> doesn't work, because the internal PS function called at the end of the
> function looks for old$command, too. 
> 
> I was able to use postscript in 1.0.1.  I looked through the NEWS, but
> couldn't find anything that seems to address this problem. 

[Well, there is a lot about postscript() changes there.]

Try looking in the NEWS of R-patched (formerly R-release).  The problem is
that you have a saved .Postscript.options object from an earlier release of
R. None of us testing it did, so I guess it must be rare to set
ps.options() and then save the workspace.


I have already posted a fix here, which is to use

.Postscript.options$command <- "default"

to update your saved object. The R-patched version of postscript() has

    if(is.null(old$command) || old$command == "default")
        old$command <- if(!is.null(cmd <- getOption("printcmd"))) cmd else ""

R-patched is supposed to have all the current patches applied, but as we
have had problems with it recently, don't take my word for it.

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