[R] Question about dotplot

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Sun Nov 29 21:19:38 CET 1998


Norm Josephy <NJOSEPHY at bentley.edu> writes:

> This groups components a,b,c,d,e,p, then a break, then 
> components q,r,s,t, then a break, then f to o, then a break, 
> then u to z. The G1 label is aligned at the same level as 
> the d entry, and the G2 label is aligned with the m entry.
> 
> Does this make sense?

Happens on Unix too, and no: it doesn't make sense...

I believe the blunder is in here:
    else {
        o <- rev(order(as.numeric(groups)))
        x <- x[o]
        groups <- groups[o]
        offset <- cumsum(c(0, diff(as.numeric(groups)[o]) != 
            0))
        y <- 1:n + 2 * offset
        ylim <- range(0, y + 2)
    }

groups is getting ordered *twice* there. Dropping the [o] in the
diff() makes the extra gaps go away, but now the group labels look
wrong. Oh, well.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list