Re: [R] Kite diagrams

From: Barry Rowlingson <B.Rowlingson_at_lancaster.ac.uk>
Date: Mon 16 Jan 2006 - 21:08:50 EST

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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jan 16 21:23:30 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:04 EST