Fastest way to find second (third…) highest/lowest value in vector or column June 23, 2022 by Tarik Use the partial argument of sort(). For the second highest value: n <- length(x) sort(x,partial=n-1)[n-1]