Learn R Programming

forensim (version 2.0)

findmax: Function to find the maximum of a vector and its position

Description

The findmax function finds the maximum of a vector and its position.

Usage

findmax(vec)

Arguments

vec
a numeric vector

Value

  • A matrix of two columns: max the position of the maximum in vec maxval the maximum

encoding

UTF-8

Details

findmax finds the maximum value of a vector and its position.

Examples

Run this code
findmax(1:10)

Run the code above in your browser using DataLab