idvalues <- data.frame (ID = c(1, 1, 2, 2, 3, 4, 4, 4, 5, 5),
                        Value = c(0.69, 0.31, 0.01, 0.99, 1.00, NA, 0,1, 0.5, 
0.5))

aggregate(Value~ID, data=idvalues, max)

ID Value
1  1  0.69
2  2  0.99
3  3  1.00
4  4  1.00
5  5  0.50

--

Best,

GG




        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to