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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.