[R] Error in PDF output in R 2.0.0

james.holtman@convergys.com james.holtman at convergys.com
Fri Oct 29 17:00:16 CEST 2004





The following script works fine in R 1.9.1.  It was creating a PDF file
with the graphs in it.  In R 2.0.0, I got the error message below.  I tried
the same script just outputting to Windows and postscript and the output
was OK.  The error message only showed up when trying to create a PDF file.


> version
         _
platform i386-pc-mingw32
arch     i386
os       mingw32
system   i386, mingw32
status
major    2
minor    0.0
year     2004
month    10
day      04
language R

## output to windows -- OK
> print(xyplot(I(usr/sys) ~ time|factor(cpu), memIn,
+     panel=function(x,y)panel.xyplot(x,y,type='l')))
> print(xyplot(csw ~ time|factor(cpu), memIn,
+     panel=function(x,y)panel.xyplot(x,y,type='l')))

## ouput to postscript file -- OK
> postscript('out.ps')
> print(xyplot(I(usr/sys) ~ time|factor(cpu), memIn,
+     panel=function(x,y)panel.xyplot(x,y,type='l')))
> print(xyplot(csw ~ time|factor(cpu), memIn,
+     panel=function(x,y)panel.xyplot(x,y,type='l')))
> dev.off()
windows
      2

## output to PDF file  --  ERRORS
> pdf('out.pdf')
> print(xyplot(I(usr/sys) ~ time|factor(cpu), memIn,
+     panel=function(x,y)panel.xyplot(x,y,type='l')))
Error in "[<-"(`*tmp*`, pos.heights[[nm]], value = numeric(0)) :
        nothing to replace with
> print(xyplot(csw ~ time|factor(cpu), memIn,
+     panel=function(x,y)panel.xyplot(x,y,type='l')))
Error in "[<-"(`*tmp*`, pos.heights[[nm]], value = numeric(0)) :
        nothing to replace with
> dev.off()
windows
      2

## traceback on error
> traceback()
3: calculateGridLayout(x, rows.per.page, cols.per.page, number.of.cond,
       panel.height, panel.width, main, sub, xlab, ylab, x.alternating,
       y.alternating, x.relation.same, y.relation.same, xaxis.rot,
       yaxis.rot, xaxis.cex, yaxis.cex, par.strip.text, legend)
2: print.trellis(xyplot(csw ~ time | factor(cpu), memIn, panel =
function(x,
       y) panel.xyplot(x, y, type = "l")))
1: print(xyplot(csw ~ time | factor(cpu), memIn, panel = function(x,
       y) panel.xyplot(x, y, type = "l")))
>
__________________________________________________________
James Holtman        "What is the problem you are trying to solve?"
Executive Technical Consultant  --  Office of Technology, Convergys
james.holtman at convergys.com
+1 (513) 723-2929
--
"NOTICE:  The information contained in this electronic mail ...{{dropped}}




More information about the R-help mailing list