Hi, I am seeking help with an error when running the example from R Documentation for TukeyHSD. The error occurs with any example I run, from any text book or website. thank you...
> plot(TukeyHSD(fm1, "tension")). Error in plot(confint(as.glht(x)), ylim = c(0.5, n.contrasts + 0.5), ...) : error in evaluating the argument 'x' in selecting a method for function 'plot': Error in UseMethod("vcov") : no applicable method for 'vcov' applied to an object of class "NULL" > ?TukeyHSD > require(graphics) > summary(fm1 <- aov(breaks ~ wool + tension, data = warpbreaks)) Df Sum Sq Mean Sq F value Pr(>F) wool 1 451 450.7 3.339 0.07361 . tension 2 2034 1017.1 7.537 0.00138 ** Residuals 50 6748 135.0 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 > TukeyHSD(fm1, "tension", ordered = TRUE) Tukey multiple comparisons of means 95% family-wise confidence level factor levels have been ordered Fit: aov(formula = breaks ~ wool + tension, data = warpbreaks) $tension diff lwr upr p adj M-H 4.722222 -4.6311985 14.07564 0.4474210 L-H 14.722222 5.3688015 24.07564 0.0011218 L-M 10.000000 0.6465793 19.35342 0.0336262 > plot(TukeyHSD(fm1, "tension")) Error in plot(confint(as.glht(x)), ylim = c(0.5, n.contrasts + 0.5), ...) : error in evaluating the argument 'x' in selecting a method for function 'plot': Error in UseMethod("vcov") : no applicable method for 'vcov' applied to an object of class "NULL" > > sessionInfo() R version 2.15.0 (2012-03-30) Platform: i386-pc-mingw32/i386 (32-bit) attached base packages: [1] grid tcltk splines stats graphics grDevices datasets utils methods base other attached packages: [1] RcmdrPlugin.HH_1.1-30 HH_2.2-30 latticeExtra_0.6-19 RColorBrewer_1.0-5 [5] leaps_2.9 multcomp_1.2-12 mvtnorm_0.9-9992 NADA_1.5-4 [9] ggplot2_0.9.0 Rcmdr_1.8-3 car_2.0-12 nnet_7.3-1 [13] DAAG_1.12 survival_2.36-12 randomForest_4.6-6 rpart_3.1-52 [17] RODBC_1.3-5 tree_1.0-29 spatstat_1.25-5 mgcv_1.7-13 [21] sciplot_1.0-9 spdep_0.5-45 coda_0.14-6 deldir_0.0-16 [25] maptools_0.8-14 foreign_0.8-49 nlme_3.1-103 MASS_7.3-17 [29] boot_1.3-4 sp_0.9-98 odesolve_0.9-9 mcmc_0.8 [33] lme4_0.999375-42 Matrix_1.0-6 lattice_0.20-6 chron_2.3-42 [37] akima_0.5-7 rcom_2.2-3.1.1 rscproxy_1.3-1 loaded via a namespace (and not attached): [1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 memoise_0.1 munsell_0.3 plyr_1.7.1 [7] proto_0.3-9.2 reshape2_1.2.1 scales_0.2.0 stats4_2.15.0 stringr_0.6 tools_2.15.0 [[alternative HTML version deleted]]
______________________________________________ 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.