Hi, I would like to replace all the max values per row with "1" and all other values with "0". If there are two max values, then "0" for both. Example:
from: 2 3 0 0 200 30 0 0 2 50 0 0 3 0 0 0 0 8 8 0 to: 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 Thanks! -- View this message in context: http://n4.nabble.com/How-to-replace-all-non-maximum-values-in-a-row-with-0-tp1819018p1819018.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.