Hello, I have a df with plots (60) and their distances to bores (20) and would like to compute the three minimum distances to bores of each plot. with >apply(df, 2, min) I get the overall min, but is there a way to get additionally to the first min, the second and third minimum distance? thanks in advance, cheers Martin