[Rd] buglet in plot.lm (PR#9333)

From: <ehlers_at_math.ucalgary.ca>
Date: Thu 02 Nov 2006 - 16:57:24 GMT


In version 2.2.0, plot.lm() was enhanced with two new plots (thanks, Martin and John).

There's a small fix needed for 'which=6' when 'id.n=0'.

> plot(lm(rnorm(10) ~ 1), which = 6, id.n = 0)
Error in plot.lm(lm(rnorm(10) ~ 1), which = 6, id.n = 0) :

         could not find function "text.id"

Fixed by inserting braces in plot.lm.R:
Replace code at line last-8:

	if (id.n > 0)
	    show.r <- order(-cook)[iid]
	text.id(g[show.r], cook[show.r], show.r)

with

	if (id.n > 0) {
	    show.r <- order(-cook)[iid]
	    text.id(g[show.r], cook[show.r], show.r)
	}



> version
_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Patched major 2 minor 4.0 year 2006 month 10 day 29 svn rev 39744 language R

version.string R version 2.4.0 Patched (2006-10-29 r39744)

Peter Ehlers



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat Nov 04 03:04:32 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 03 Nov 2006 - 16:30:37 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.