buglet in plot.lm (PR#9333)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

buglet in plot.lm (PR#9333)

P Ehlers
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel