Learn R Programming

DAPAR (version 1.4.7)

topMaxUsingPartialSortIndices: Function to return the indices of the n higher values in the vector

Description

Method to return the indices of the n higher values in the vector

Usage

topMaxUsingPartialSortIndices(x, n)

Arguments

x
A vector of numeric values
n
The number of values to be returned

Value

A vector of the indices of the n highest values

Examples

Run this code
topMaxUsingPartialSortIndices(c(1:10), 3)

Run the code above in your browser using DataLab