[R] overlaying qqnorm plots...

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Nov 27 20:33:49 CET 2001


"Paul Murrell" <p.murrell at auckland.ac.nz> writes:

>     y1 <- rnorm(100)
>     y2 <- rexp(100)
>     qqnorm(y1, ylim=range(y1, y2), col="blue")
>     secondpts <- qqnorm(y2, plot.it=FALSE)
>     points(secondpts, col="red")

Um, yes... I seem to have forgotten that the y values are of course
the original data.

BTW: It may be a good idea to do it as line plots. For that, you'll need 

 qqnorm(sort(y1), ylim=range(y1, y2), col="blue", type="l")

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