Hi all, Note: lm(Yield ~ Block + C(Variety, base = 2), Alfalfa)
equals i <- 2; lm(Yield ~ Block + C(Variety, base = i), Alfalfa) However, lme(Yield ~ C(Variety, base = 2), Alfalfa, random=~1|Block) which is fine, does not equal i <- 2; lme(Yield ~ C(Variety, base = i), Alfalfa, random=~1|Block) after which I get the message "Error in model.frame.default(formula = ~Yield + Variety + i + Block, data = list( : variable lengths differ (found for 'i')" Is everything fine with that? Regards, Marcin ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.