normalize: Min-max normalization

View source: R/normalize.R View source: R/nda.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

nda documentation built on Oct. 14, 2024, 5:10 p.m.