centre.scale.dataset | R Documentation |
Centre and scale a data matrix. Scaling is done on each column separately
centre.scale.dataset(x = NULL, centre.data = "median")
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' |
A centred and scaled data matrix
Syed Haider
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);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.