makeScale: Makes functions to scale (zscore) variables

Description Usage Arguments Value Author(s)

View source: R/makeScale.R

Description

Normalize tables by columns with Z score. This function returns the mean value and standard deviation of each column, and the functions to pass from the original table to a normilized one and vice versa.

Usage

1
makeScale(table, cols= colnames(table), mean.function=mean, sd.function=sd)

Arguments

table

table that contain the data.

cols

character vector with names of columns to normalize.

mean.function

function to get the mean value to use in Z score.

sd.function

function to get the standard deviation value to use in Z score.

Value

Returns a list that contain 4 elements, the functions scale(table) and unScale(table) which recieve a table an returns a normalized or un-normalized one, a vector with the mean value of each column with its name and another vector with the standard deviation value of each column with its name.

Author(s)

Daniel Fischer


danielfm123/dftools documentation built on July 17, 2021, 1 p.m.