[R] following Appendix A results in "plot.new has not been called yet"

durbano@shbano.com durbano at shbano.com
Fri Nov 11 01:26:01 CET 2005


Hello. I was exploring the R software package and received the error
message "plot.new has not been called yet" when following "Appendix A A
Sample Session" of R-intro.pdf.  I searched the message archives and
found no similiar report to mine.

I am using R on CentOS and I am using the latest from R-project, version
2.2.0.

Here is my .Rhistory file recorded when following the appendix after the
first removal of variables (e.g. "rm(x,y)" ):

x <- 1:20
w <- 1 + sqrt(x)/2
dummy <- data.frame(x=x, y=x + rnorm(x)*w)
dummy
fm <- lm(y ~ x, data=dummy)
summary(fm)
fm1 <- lm(y ~ x, data=dummy, weight=1/w^2)
summary(fm1)
attach(dummy)
lrf <- lowess(x,y)
plot(x,y)
lines(x, lrf$y)

Results in:

Error in plot.xy(xy.coords(x, y), type = type, col = col, lty = lty,
...) :
        plot.new has not been called yet

If I continue along with the list of commands, I yield similiar errors.

I am unsure if this is related to using CentOS, my installation, bad
steps in the pdf file, or a bug in the software.  I am leaning towards
the steps in the pdf.

Regards,

Daniel




More information about the R-help mailing list