The xYplot function in the Hmisc library handles error
bars and bands, and recently color-filled bands (thanks
to Madeline Bauer). You will find that xYplot uses
a simple trick to pass multiple-column response variables
to Trellis and that you might be able to easily modify
xYplot to plot arrows. If you decide that this is a
good approach and would like to contribute new code
for xYplot that would be fine too. Be sure to use
the latest code (from
http://hesweb1.med.virginia.edu/biostat/s/splus.html
or better still get the master source code for xYplot
from me). -Frank Harrell
David Parkhurst wrote:
>
> 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
>
> ---------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
--
Frank E Harrell Jr Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
|