[R] xyplot and separate abline per plot
Karin Lagesen
karinlag at studmed.uio.no
Fri Jun 27 12:45:17 CEST 2008
Hello list!
I have a set of data like this:
> alldata[1:5,]
breaks numbers disttype moltype type
1 0.0000000 6598 Gapped Distances 5S Between species
2 0.4066667 0 Gapped Distances 5S Between species
3 0.8133333 5228 Gapped Distances 5S Between species
4 1.2200000 0 Gapped Distances 5S Between species
5 1.6266667 9702 Gapped Distances 5S Between species
> levels(alldata$disttype)
[1] "Gapped Distances" "Ungapped Distances"
> levels(alldata$type)
[1] "Between species" "Same species"
> levels(alldata$moltype)
[1] "16S" "23S" "5S"
>
Which I plot like this:
xyplot(numbers~sqrt(breaks)|moltype+disttype, groups = type, data = alldata)
This results in a plot consisting of six different panels. Now, I have
a set of six different values that I would like to incorporate into
these plots through a vertical line in each panel (one separate value
per panel). I think I can do this through panel.abline somehow, but I
don't know how to incoporate that into the xyplot command, and I don't
know how to specify which values I want plotted in each plot.
I hope I am able to convey what I want:)
Thanks in advance,
karin
--
Karin Lagesen, PhD student
karin.lagesen at medisin.uio.no
http://folk.uio.no/karinlag
More information about the R-help
mailing list