> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Rich Shepard > Sent: Wednesday, February 19, 2014 4:05 PM > To: r-help@r-project.org > Subject: [R] ISwR Plotting Issue > > I'm trying to replicate the linear regression plot on pages 112-113 in > Peter Dalgaard's "Introductory Statistics with R" and getting the error > that > "plot.new has not been called yet." > > A Web search on that error offered suggestions to run plot.new() or > x11(), > but all those do is put up an empty plotting window. My code, and R's > responses, follow: > > > library(ISwR) > > Attaching package: ʽISwRʼ > > The following object is masked from ʽpackage:survivalʼ: > > lung > > > attach(thuesen) > > plot(blood.glucose,short.velocity) > > abline(lm(short.velocity ~ blood.glucose)) > Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : > plot.new has not been called yet > > What have I missed here? > > Rich >
Rich, I loaded ISwR and ran your code (as cut-n-paste from your email) and got a plot of the data with regression line without any error message. What version of R and ISwR are you running? Have you tried closing R and starting a clean session? Since the example worked for me, there is not much else I can help with. Dan Daniel Nordlund Bothell, WA USA ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.