autoscale: Unit variance scaling method performed on the columns of the...

Description Usage Arguments Value Author(s) Examples

Description

The function provides a data pretreatment approach called Autoscaling (also known as unit variance scaling). The data for each variable (metabolite) is mean centered and then divided by the standard deviation of the variable. This way each variable will have zero mean and unit standard deviation.

Usage

1
autoscale(data, exclude = T)

Arguments

data

a n x p data frame with n observations and p columns. While the first two columns usually represent the names of the samples and the class labels related to each sample respectively, the remaining columns represent metabolite concentrations measured by 1H NMR or bins of 1H NMR spectra

exclude

a boolean variable which stores a simple True/ False setting. If set to True the scaling method will exclude the first two columns.

Value

a scaled version of the input matrix

Author(s)

Piegiorgio Palla

Examples

1
2
3
4
5
## load the included example dataset
data(cachexiaData)
## call autoscale with the parameter exclude set to TRUE (default) 
## in order to exclude the first two columns of the dataset from scaling
data.scaled <- autoscale(cachexiaData, exclude = TRUE)

Example output

Loading required package: AUCRF
Loading required package: randomForest
randomForest 4.6-14
Type rfNews() to see new features/changes/bug fixes.
AUCRF 1.1

Attaching package: 'RFmarkerDetector'

The following object is masked from 'package:stats':

    screeplot

RFmarkerDetector documentation built on May 2, 2019, 3:42 p.m.