r - Exporting TukeyHSD results -
i'm having trouble exporting tukeyhsd results separated in cells when open results in excel. tried using write.csv() says:
cannot coerce class "c("tukeyhsd", "multicomp")" data.frame
how can capture tukeyusd results in way can copy , paste them excel sheet?
tukeyhsd
returns object of class "tukeyhsd". can extract table of results "tukeyhsd" object using $
operator. can export or modify table in way see fit.
fm1 <- aov(breaks ~ wool + tension, data = warpbreaks) res <- tukeyhsd(fm1, "tension", ordered = true) as.data.frame(res$tension) # diff lwr upr p adj # m-h 4.722222 -4.6311985 14.07564 0.447421021 # l-h 14.722222 5.3688015 24.07564 0.001121788 # l-m 10.000000 0.6465793 19.35342 0.033626219
Comments
Post a Comment