View source: R/hoff_functions.R
topK | R Documentation |
Identify top K elements of a vector.
topK(x, K = 1, ignoreties = TRUE)
x |
The vector. |
K |
The number of indices to return. |
ignoreties |
If |
This function returns the indices corresponding to the top elements of a vector.
Peter Hoff.
x <- c(3, 6, 2, 4, 1) tensr:::topK(x, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.