anova - Can't handle an object of class “formula” -
i'm trying pairwise comparisons of adjusted means using lsmeans described in thread above.
the anova script works fine:
model <- (ch4.flux ~ site) defopt <- options() options(contrasts=c("contr.sum", "contr.poly")) print(drop1(aov(model),~.,test="f")) options <- defopt
but when try run
library(lattice) library(mvtnorm) library(coda) library(nlme) library(multcomp) library(th.data) library(zoo) library(sandwich) library(plyr) library(rcpp) library(xtable) library(lsmeans) print(lsmeans(model, list(pairwise ~ site)), adjust = c("tukey"))
i get:
error in ref.grid(object = ch4.flux ~ site, = null, contr = "pairwise") : can't handle object of class “formula” use help("models", package = "lsmeans") information on supported models.
i've searched error message , can't find else struggling it, must doing stupid!
Comments
Post a Comment