Description Usage Arguments Value Author(s) Examples
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.
1 | meanCenter(data, exclude = T)
|
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. |
a mean centered version of the input matrix
Piergiorgio Palla
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.