[R] Help with xYplot() in package Hmisc

Michael Kubovy kubovy at virginia.edu
Mon Mar 12 11:15:57 CET 2007


Dear r-helpers,

I would like to add three fitted lines to this plot. I don't know how  
to include three panel.abline() to the call to xYplot. I would like  
the colors of the lines correspond to the color of the dots and CI bars.

x <- c(1:4, 1:4, 3:6)
y <- c(4:1, 6:3, 5:2)
e <- runif(12) - .5
y <- y + e
ll <- y - 1
ul <- y + 1
g <- c(rep(1, 4), rep(2, 4), rep(3, 4))
df <- data.frame(x, y, ll, ul, g)
xYplot(Cbind(y, ll, ul) ~ x, groups = g, type = 'p', data = df)
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/



More information about the R-help mailing list