hi All, I have a matrix Ufi (x by y)
1 2 3 4 5 1 0 0 0 0 3 2 0 0 0 9 0 3 0 2 0 0 3 4 0 0 1 0 0 5 0 1 0 0 0 And I need the x and y "coordinates" of those cells with maximum values: First: x=4; y=2 (Value=9) Second: x=5; y=3 (value=3) Any help? THANKS! Nic ______________________________________________ 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.