anova - Can't handle an object of class “formula” -


multcomp tukey-kramer

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

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -