I have a dataframe, df, of this general form (f is a factor; x, y1, and y2
are numeric):
f x y1 y2
1 1 4 6
1 3 2 3
1 5 7 1
2 1 6 2
2 2 3 3
2 4 1 6
3 1 2 4
3 4 3 2
3 5 6 7
I'd like to write a trellis panel function that would yield a plot with
three panels (one for each factor level), and in each panel would plot
arrows (using the arrow function) from y1 to y2, with each arrow being
above the corresponding x value.
How would I accomplish that? My problem lies in how to get more than
one y vector into the panel function, which requires arguments (x,y).
Thanks much.
Dave Parkhurst
|