Hi, I have a matrix, first column is of certain values, second column is the class labels or a factor. e.g.
1.2 1 1.3 1 1.3 1 1.5 1 2.1 2 2.0 2 9.9 2 1.4 3 1.8 3 1.9 3 I want to find out what is the min values of column 1 for each corresponding class (column 2). For the above example, I want to return a matrix of 1.2 1 2.0 2 1.3 3 Can someone suggest how to code for that? The second column can be of characters. Thanks much. -- Waverley @ Palo Alto ______________________________________________ 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.