[R] Function for gruping similar variables?
Timo W
esuomikim at gmail.com
Tue Jul 6 11:32:59 CEST 2010
Hi,
I have a matrix of results of multiple 2x2 chi^2 tests, non-
significant tests are marked as TRUE. Is there a function for grouping
those variables in a similar way LSD.test from agricolae library does?
I reviewed LSD.test's source but it's not helpful for me.
This is my matrix:
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
1 TRUE FALSE TRUE TRUE TRUE FALSE TRUE
2 FALSE TRUE FALSE FALSE FALSE FALSE FALSE
3 TRUE FALSE FALSE FALSE TRUE FALSE FALSE
4 TRUE FALSE FALSE TRUE TRUE TRUE TRUE
5 TRUE FALSE TRUE TRUE TRUE TRUE TRUE
6 FALSE FALSE FALSE TRUE TRUE TRUE TRUE
7 TRUE FALSE FALSE TRUE TRUE TRUE TRUE
And I'd like to get similar output to this (LSD.test):
Groups, Treatments and means
a oo 36.9
a ff 36.33333
b cc 24.4
c fc 12.86667
For example, there's a group of variables 4, 5, 6, & 7 that don't
significantly differ from each other. Is there any _simple_ way to
mark all of them as a group?
If you have any ideas, I'd be grateful.
Thanks in advance,
Timo
More information about the R-help
mailing list