min_max: Minimum and maximum of a vector

View source: R/min_max.R

Minimum and maximum R Documentation

Minimum and maximum of a vector

Description

Minimum and maximum of a vector.

Usage

min_max(x,index=FALSE, percent = FALSE)

Arguments

x

A numerical vector with data. NAs are handled naturally.

index

A boolean value for the indices of the minimum and the maximum value.

percent

A boolean value for the percent of the positive and negative numbers.

Value

A vector with the relevant values, min and max.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

See Also

rowMins, rowMaxs, nth, colrange, colMedians,colSort, rowSort

Examples

x <- rnorm(100 * 500)
s1 <- min_max(x) 
s2 <- c(min(x), max(x)) 


Rfast documentation built on Nov. 9, 2023, 5:06 p.m.