After running the test (model1.emm=emmeans(model1,~timeBin)
contrast(model1.emm, "trt.vs.ctrl", ref = 1, adjust='fdr')
), here is what I see in Console:
Would it be possible to export this output to a dataframe?
I learned how to export the rest of the results:
result = as.data.frame(summary(model1.emm))
Export it the same way. The result of contrast()
is an emmGrid
object, the same class as from emmeans()
. You may use summary()
or as.data.frame()
— no need to use both.