interesting to know, that might explain it.  When I imported I just saved as
CSV and imported with read.csv, I've never done anything to specify the
integers as factors (this is the first time I've used numbers as names).

Here are the precise commands I use(d):

> phen=read.csv(file="phenolics.csv")
> phen.aov=aov(phenolics~sink*time*cat, data=phen)
> summary(phen.aov)
               Df  Sum Sq Mean Sq F value    Pr(>F)
sink            2 1817.79  908.89 59.5934 < 2.2e-16 ***
time            1   19.07   19.07  1.2501  0.265039
cat             1  125.95  125.95  8.2581  0.004548 **
sink:time       2   12.02    6.01  0.3942  0.674834
sink:cat        2  305.68  152.84 10.0213 7.493e-05 ***
time:cat        1  106.53  106.53  6.9849  0.008949 **
sink:time:cat   2    4.22    2.11  0.1384  0.870867
Residuals     179 2730.03   15.25
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
1 observation deleted due to missingness

TukeyHSD(phen.aov)
  Tukey multiple comparisons of means
    95% family-wise confidence level

Fit: aov(formula = phenolics ~ sink * time * cat, data = phen)

$sink
                 diff       lwr      upr     p adj
Cut-Bolted -0.3491591 -1.980764 1.282446 0.8686316
Veg-Bolted  6.3800257  4.741959 8.018092 0.0000000
Veg-Cut     6.7291848  5.091118 8.367252 0.0000000

$time
.......etc.

I can see how the data format of the cell in Excel might confuse R if you
imported it as an .xls file, or used Rexcel, thats avoided by using .csv.

Whats interesting is that the aov function has no problem determining the
levels of the factor be they integers or text, TukeyHSD doesn't like it
though.  When I did the summary(aov) with the data formatted such that it
would not go into TukeyHSD it was imported with read.csv, but it had
numbers/integers as the factor levels.  TukeyHSD didn't work.  When I
reformatted those numbers to text (ie "24" to "twenty-four"), TukeyHSD
worked fine.

I assume it has something to do with how aov and TukeyHSD determine factor
levels, aov may see anything in the specified factor-vectors as characters,
whereas TukeyHSD will read integers as integers and get confused.




On Tue, Oct 20, 2009 at 5:50 PM, Richard M. Heiberger <rmh@temple.edu>wrote:

> >I think its a problem with my data, something about how Rexcel
> >imported it
>
> We don't have enough information to be sure.  My guess is that your
> data in Excel is integers which are intended to be levels of a factor.
> Excel doesn't distinguish between integers and integers that might be
> factor levels.  This is an Excel issue, not an RExcel issue.
>
> When you sent your data to R outside of RExcel, what did you do to
> force the levels to be interpreted as factors.  Something similar must
> be done when you send the data to R from within RExcel.
>

	[[alternative HTML version deleted]]


