Answers for "R find n largest"

R
0

R find n largest

order(vector, decreasing=TRUE)[1:N] # for positive values
order(abs(vector), decreasing=TRUE)[1:N] # for pos & neg
Posted by: Guest on February-18-2021

Browse Popular Code Answers by Language