Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

min_max

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

Examples

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

Rfast

A Collection of Efficient and Extremely Fast R Functions

v2.0.1
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Marios Dimitriadis, Stefanos Fafalios, Ioannis Tsamardinos, Matteo Fasiolo, Giorgos Borboudakis, John Burkardt, Changliang Zou, Kleanthi Lakiotaki and Christina Chatzipantsiou.
Initial release
2020-09-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.