How to fix an error when using TukeyHSD() with weighted means?

Dear all,

I use aov() with weighted means, then I use TukeyHSD() and it shows the following message:

Error in result[, i] <- prj[, select, drop = FALSE] %*% rep.int(1, df[i]) :
number of items to replace is not a multiple of replacement length

How do I fix this error?

Thanks a lot

I think we need a FAQ: How to do a minimal reproducible example ( reprex ) for beginners

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.