An R package to get k minimum or maximum values from a numeric vector, or to get the indices of them.
devtools::install_github('j1wan/topk')
x <- sample(1:100)
MinK(x, 10)
MaxK(x, 20)
WhichMinK(x, 10)
WhichMaxK(x, 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.