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

normalize a vector, matrix or array (in the range between 0 and 1)

1 |

`x` |
either a vector, matrix, data frame or array |

This is a helper function which normalizes all pixel values of the object to the range between 0 and 1. The function takes either a vector, matrix, data frame or array as input and returns a normalized object of the same type (in case of data frame it returns a matrix).

either a normalized vector, matrix, or array

Lampros Mouselimis

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 = NormalizeObject(x)
# matrix
x = matrix(runif(100), 10, 10)
res = NormalizeObject(x)
# data frame
x = data.frame(matrix(runif(100), 10, 10))
res = NormalizeObject(x)
# array
x = array(runif(100), dim = c(10, 10, 3))
res = NormalizeObject(x)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.