normalize: Min-max normalization

View source: R/nda.R View source: R/normalize.R

normalizeR Documentation

Min-max normalization

Description

Min-max normalization for data matrices and data frames

Usage

normalize(x,type="all")

Arguments

x

A data frame or data matrix.

type

The type of normalization. "row" normalization row by row, "col" normalization column by column, and "all" normalization for the entire data frame/matrix (default)

Value

Returns a normalized data.frame/matrix.

Author(s)

Zsolt T. Kosztyan, University of Pannonia

e-mail: kosztyan.zsolt@gtk.uni-pannon.hu

Examples

  mtx<-matrix(rnorm(20),5,4)
  n_mtx<-normalize(mtx) # Fully normalized matrix
  r_mtx<-normalize(mtx,type="row") # Normalize row by row
  c_mtx<-normalize(mtx,type="col") # Normalize col by col
  print(n_mtx) # Print fully normalized matrix

kzst/nda documentation built on Dec. 28, 2024, 6:07 p.m.