Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 311 Bytes

File metadata and controls

19 lines (14 loc) · 311 Bytes

MinK, MaxK, WhichMinK, WhichMaxK for R

An R package to get k minimum or maximum values from a numeric vector, or to get the indices of them.

Installation

devtools::install_github('j1wan/topk')

Example

x <- sample(1:100)
MinK(x, 10)
MaxK(x, 20)
WhichMinK(x, 10)
WhichMaxK(x, 20)