centre.scale.dataset {SIMMS} | R Documentation |
Centre and scale a data matrix
Description
Centre and scale a data matrix. Scaling is done on each column separately
Usage
centre.scale.dataset(x = NULL, centre.data = "median")
Arguments
x |
A sample by feature data matrix |
centre.data |
A character string specifying the centre value to be used for scaling data. Valid values are: 'median', 'mean', or a user defined numeric threshold e.g. '0.3' when modelling methylation beta values. This value is used for both scaling as well as for dichotomising data for estimating univariate betas from Cox model. Defaults to 'median' |
Value
A centred and scaled data matrix
Author(s)
Syed Haider
Examples
tmp <- matrix(data = rnorm(100, 10, 2), nrow = 20);
tmp.scaled.median <- centre.scale.dataset(x = tmp);
tmp.scaled.mean <- centre.scale.dataset(x = tmp, centre.data = "mean");
tmp.scaled.custom <- centre.scale.dataset(x = tmp, centre.data = 0.3);
[Package SIMMS version 1.3.2 Index]