Skip to content
/ topk Public

An R package to get min/max/argmin/argmax k elements from a vector

Notifications You must be signed in to change notification settings

j1wan/topk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

An R package to get min/max/argmin/argmax k elements from a vector

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages