I have a data.frame with several columns (17).
Column 2 have several rows with the same value, I want to keep only one of those rows, specifically the one that has the maxim
> ind <- with(dat, tapply(B, A, which.max)) # Using @Roland's data
> mysplit <- split(dat, dat$A)
> do.call(rbind, lapply(1:length(mysplit), function(i) mysplit[[i]][ind[i],]))
A B C
3 a 3 0.3631284
5 b 200 0.4042683