how to find n highest numbers in r code example
Example: R find n largest
order(vector, decreasing=TRUE)[1:N] # for positive values
order(abs(vector), decreasing=TRUE)[1:N] # for pos & neg
order(vector, decreasing=TRUE)[1:N] # for positive values
order(abs(vector), decreasing=TRUE)[1:N] # for pos & neg