[R] Highlighting points in a quantile plot for different values of a second column

Saptarshi Guha saptarshi.guha at gmail.com
Sat Feb 13 21:50:14 CET 2010


Hello,
I have the following data frame, using lattice and qqmath, how do I display the
quantile plot (e.g distribution = qunif), but highlight the f==TRUE and f==FALSE
differently?

library(lattice)
pp <- function(n) ((1:n)-0.5)/n

x=data.frame(x=runif(20),f=sapply(runif(20),function(r) r>0.5))

I would like a single curve, the following example displays two curves.

qqmath(~x,groups=f,data=x,distribution=qunif,f.value=pp)



Thank you
Saptarshi



More information about the R-help mailing list