Matrix or vector normalization

Description

Normalizes a vector o a matrix in the form of x/max(x). Is is a matrix, a column-normalization is performed, which is equivalent to apply(x,2,function(x) x/max(x)).

Usage

1

Arguments

x

a vector or a matrix to be normalized

Value

returns the normalized vector o matrix.