[R] postscript device on R-1.1.0

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jun 16 15:40:32 CEST 2000


> X-Authentication-Warning: mathsxt02.lancs.ac.uk: brownpe owned process doing 
-bs
> Date: Fri, 16 Jun 2000 14:07:56 +0100 (BST)
> From: Patrick Brown <p.e.brown at lancaster.ac.uk>
> To: r-help at stat.math.ethz.ch
> Subject: [R] postscript device on R-1.1.0
> 
> Am I the only one with this problem?  
> 
> > postscript()
> Error in old$command == "default" : comparison (1) is possible only for
> vector types
> 
> The function postscript() is creates a list called "old".  the function
> wants to access old$command, but old does not have a component called
> command.
> 
> > postscript
> function (file = ifelse(onefile, "Rplots.ps", "Rplot%03d.ps"), 
>     onefile = TRUE, ...) 
> {
>     new <- list(onefile = onefile, ...)
>     old <- check.options(new = new, name.opt = ".PostScript.Options", 
>         reset = FALSE, assign.opt = FALSE)
>     if (old$command == "default") 
>         old$command <- if (!is.null(cmd <- getOption("printcmd"))) 
>             cmd
>         else ""
>     .Internal(PS(file, old$paper, old$family, old$bg, old$fg, 
>         old$width, old$height, old$horizontal, old$pointsize, 
>         old$onefile, old$pagecentre, old$print.it, old$command))
> }
> > temp_check.options(new=list(onefile=T), name.opt =
> ".PostScript.Options", reset=F, assign.opt=F)
> > names(temp)
>  [1] "paper"      "horizontal" "width"      "height"     "family"    
>  [6] "pointsize"  "bg"         "fg"         "onefile"    "print.it"  
> [11] "append"     "pagecentre"
> 
> postscript works if I change 
>   if (old$command == "default")
> to
>   if (is.null(old$command)) 

Yes, but that's not what is intended. You have a file .PostScript.Options
around somewhere in a saved workspace.  Just use

.PostScript.Option$command <- "default"

to update it, or delete it and use ps.options() to re-create 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