Problems with S+ and nested GLM models. Is there an R solution?

Sorry for cross posting this but I'm not sure where to post this.

I was wondering if someone might be able to help. My department has just changed statistic programs to S+ and I'm trying to run a multi-factorial GLM with one nested factor (design below). What was simple task in our old software has stumped everyone in my department. Does anyone know how we can run this test in S+? I'm wondering if there is a code line from R that we could insert into S+.

zone - fixed
Height- fixed
Location(zone)- random
zone x height- fixed
location(zone) x height- random


Cookie Scientist
I see that you want to fit a mixed model. There are many packages in R for fitted mixed models. One of the most popular is the lme4 package, which offers the lmer() function. Without knowing any more about your data or statistical problem, I think the proper specification in lmer() would look something like:
if(!require(lme4)) install.packages("lme4"); library(lme4)

model <- lmer(response ~ height*zone + (height|location:zone), data=myData)
For some explanation of this syntax, see the following section of the following FAQ (which is also just a generally very helpful resource for fitting mixed models in R):

Admittedly, I am not sure what the situation is like accessing packages written for R from within S+. But I guess I would be a little surprised if you could not do this in S+.
hi Jake

Thanks for the code. We'll give it a go and see what happens. This is actually a data set used by my boss for sampling design and stats class but our department switched to S-plus and it will only let you run a fully nested design. hopefully your code will help us.