[R] Illustrating kernel distribution in wheat ears
Jim Lemon
jim at bitwrit.com.au
Mon Jan 11 10:56:05 CET 2010
On 01/11/2010 06:47 PM, Carl-Göran CG. Pettersson wrote:
> Dear all
>
> R2.10 WinXP
>
> I have a dataset dealing with the way different wheat cultivars build their yield.
> Wheat ears are organised in spikelets where the spikelets can be numbered from the bottom, with even numbers on one side and odd on the other.
> I know how many kernels there were in each spikelet after some months spent counting them...
>
> Now I want to illustrate the differences between the cultivars in how the kernels are distributed in the ears.
> In the best of all possible worlds it would be possible to place histograms or boxplots on adjecent sides of vertical lines representing different cultivars.
> I have done some experimenting using boxplot() but I am stuck and out of ideas right now.
>
>
Hi Carl,
Is this what you are looking for?
plot(0,xlim=c(0.5,6.5),ylim=c(0,6),
main="Kernel distribution",xlab="Cultivar",
ylab="Count",type="n",xaxt="n")
cultivars<-unique(spikernel$cn)
axis(1,at=1:6,labels=cultivars)
for(cultivar in 1:6)
boxplot(unlist(spikernel[spikernel$cn==cultivars[cultivar],]),
add=TRUE,at=cultivar)
abline("v"=1.5:5.5)
Jim
More information about the R-help
mailing list