[R] Matrix manipulation
Patrick Connolly
p.connolly at hortresearch.co.nz
Mon May 5 05:50:21 CEST 2003
I have a square matrix wherein a '*' indicates an HSD between the
levels indicated by row name and column name. The '.' is simply
marking the diagonal. A blank indicates the same group
A B C D E F G H I J K L M N
A .
B .
C * * .
D * * .
E * * * .
F * * * .
G * * * .
H * * * .
I * * * * * * * .
J * * * * * * * .
K * * * * * * * * .
L * * * * * * * * * * .
M * * * * * * * * * * .
N * * * * * * * * * * * * .
I'm having trouble devising a method that ends up with groups of the
14 levels, such as this:
A a
B a
C b
D bc
E c
F c
G c
H cd
I d
J d
K d
L de
M de
N e
It's not important to make it vectorized, since the matrix is small,
but I could be doing this often enough to not want to do it by hand.
Suggestions welcome.
Thanks
--
Patrick Connolly
HortResearch
Mt Albert
Auckland
New Zealand
Ph: +64-9 815 4200 x 7188
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
I have the world`s largest collection of seashells. I keep it on all
the beaches of the world ... Perhaps you`ve seen it. ---Steven Wright
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
More information about the R-help
mailing list