From asherman at ksu.ru  Thu Nov 27 14:30:04 2008
From: asherman at ksu.ru (asherman at ksu.ru)
Date: Thu, 27 Nov 2008 14:30:04 +0100 (CET)
Subject: [Rd] A small bug in R code of the legend function of the Graphics
	pacakge (PR#13340)
Message-ID: <20081127133004.A4BF6282BEBF@mail.pubhealth.ku.dk>

Full_Name: Arkady  Sherman
Version: 2.8.0
OS: Windows XP
Submission from: (NULL) (158.195.16.114)


Please consider initialization of the  "seg.len" variable. It's done only
    if (do.lines) {  seg.len <- 2 ..,

but after the seg.len is used:
    if (has.pch) {
        pch <- rep(pch, length.out = n.leg)
        pt.bg <- rep(pt.bg, length.out = n.leg)
        pt.cex <- rep(pt.cex, length.out = n.leg)
        pt.lwd <- rep(pt.lwd, length.out = n.leg)
        ok <- !is.na(pch) & (is.character(pch) | pch >= 0)
        x1 <- (if (merge) 
            xt - (seg.len/2) * xchar
so if do.lines isn't specified, but has.pch and merge are specified an error is
produced.
Guess that seg.len should be initialized before the condition "if (do.lines)"
    Thanks in advance.



[Rd] A small bug in R code of the legend function of the Graphics pacakge (PR#13340)
asherman at ksu.ru