[R] How to assign scores to rows based on column values

burgundy sauburn at yahoo.com
Sun Apr 25 07:08:43 CEST 2010


Hi,

I'm trying to assign a score to each row which allow me to identify which
rows differ. In the example file below, I've used "," to indicate column
separators. In this example, I'd like to identify that row 1 and row 5 are
the same, and row 2 and row 4 are teh same. 
Any help much appreciated. Also, any comments on what the command lines do
would be fantastic.
Thanks!!

example file:
0,0,1,0,1,0,0
0,1,0,0,0,0,1
0,0,0,0,0,0,0
0,1,0,0,0,0,1
0,0,1,0,1,0,0
0,0,0,1,0,0,0

example request output:
1
2
3
2
1
4

-- 
View this message in context: http://r.789695.n4.nabble.com/How-to-assign-scores-to-rows-based-on-column-values-tp2064018p2064018.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list