[R] replace cells with column number

burgundy sauburn at yahoo.com
Tue Apr 13 14:07:35 CEST 2010


Hello,

I'm trying to replace cells with value 1 with the number of the column.
Example below.
Thank you!

from:
0,1,0,1
0,0,0,1
1,0,0,1

to:
0,2,0,4
0,0,0,4
1,0,0,4



-- 
View this message in context: http://n4.nabble.com/replace-cells-with-column-number-tp1838289p1838289.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list