[R] Kite diagrams
Barry Rowlingson
B.Rowlingson at lancaster.ac.uk
Mon Jan 16 11:08:50 CET 2006
Par Leijonhufvud wrote:
> I teach biology, and would like to show the students how to use R for
> some statistical assignments. One of those is to make a kite diagram
> (for example as seen in
> http://www.medinavalleycentre.org.uk/images/Bembri1.jpg). Is there any
> way to create one using R? I did a help.search("kite") and looked on the
> r-project HP with no luck.
The joy of R is that of course there is a way to create these - you
just have to write the code!
The data are, I guess, on the X-axis a discrete set of distance
points, (identical for each species?), and then for each species an
abundance measurement - is this continuous or discretized, or does it
only take the values shown on the key ('ACFOR' = Abundant, Common,
Frequent, Occasional, Rare??). Looking at the kites I'd guess the data
are numbers and nearly-continuous.
Anyway, you can use plot() with type='n' to set out a blank plot with
X-axis according to your distance scale and a Y-axis of something like
1:Nspecies, then use the polygon() function to draw the little kites,
making sure you dont draw anything between separated kites. This
probably means several polygon() calls or sticking NA's in the coordinates.
Adding the little cross-section of the shoreline at the top is
possible too...
> Previously when the course was taugh the students have either abused MS
> Exel or drawn the diagrams by hand.
Whereas now they can just rely on the goodwill of R-help to do it! :)
Why do these interesting questions always seem to occur on a Monday
morning when I really dont want to get on with the stuff I'm supposed to
be doing....
Barry
More information about the R-help
mailing list