minimum and maximum values of vector, matrix, data frame or array

Description

minimum and maximum values of vector, matrix, data frame or array

Usage

1

Arguments

x

either a vector, matrix, data frame or array

Details

This helper function returns the minimum and maximum values of a vector, 2-dimensional or 3-dimensional objects. In case of a vector, matrix or data frame it returns a single value for the minimum and maximum of the object. In case of an array it returns the minimum and maximum values for each slice of the array.

Value

a list

Author(s)

Lampros Mouselimis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# vector
x = 1:10

res = MinMaxObject(x)


# matrix
x = matrix(runif(100), 10, 10)

res = MinMaxObject(x)


# data frame
x = data.frame(matrix(runif(100), 10, 10))

res = MinMaxObject(x)


# array
x = array(runif(100), dim = c(10, 10, 3))               

res = MinMaxObject(x)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.