Split Plot ANOVA in R I have an experimental design in which I am comparing two or three types of soil (depending on how I group them) across two elevation transects. My overall goal is to compare different soil types, but since elevation is involved some of the parameters I am testing seem to have a linear trend. Within this design there are two different slopes, different elevation points where the soil was collected, and the parameter that I am testing. I also have two different seasons that I repeated this experiment in. I was instructed that this is a split plot ANOVA design, but I am having difficulty finding an r code that works with what I have. Any suggestions?
 A: In light of @chl's comment, I'm going to give this a statistical, as opposed to an R programmer's answer. A split plot design is a linear model. In other application areas they are called repeated measures designs, but the structure is the same. Their distinguishing characteristic is that there are restrictions on the randomization. Imagine 6 plots, say, each divided into 2 sub-plots. This gives me 12 sub-plots in all. Suppose I have two factors, A and B,  of 3 and 2 levels each, for 6 treatment combinations. In a full factorial design, I would randomly assign the 6 treatment combinations to the 12 sub-plots. But suppose factor A has to be applied to an entire plot at once. I would then randomly assign the 3 levels of factor A to the 6 plots. Then, within each plot I would randomly assign the 2 levels of B. Factor B is said to be nested in factor A. Not all the treatment allocations envisaged in a fully randomized design are available in the split plot. The treatment sums of squares will be the same as you would get from a fully randomized design, but the F tests are different. 
In R, you can analyse this with the aov() function. ${\tt aov(y \sim A*B + Error(A/B))}$
There are packages that specialize in split-plot analysis as well.
