meanCenter: Mean centering performed on the columns of the data (i.e....

Description Usage Arguments Value Author(s) Examples

Description

The function allows to have each predictor (column) centered on zero. The average value of each predictor is substracted to each value in the column.

Usage

1
meanCenter(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 logical variable which stores a simple True / False setting. If set to True the scaling method will exclude the first two columns.

Value

a mean centered version of the input matrix

Author(s)

Piergiorgio Palla

Examples

1
2
3
4
5
## load the included example dataset
data(cachexiaData)
## call meanCenter with the parameter exclude set to TRUE (default) 
## in order to exclude the first two columns of the dataset from scaling
data.scaled <- meanCenter(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.