An efficient method of centering and/or scaling a matrix or vector.
Like R's own scale()
, this will cast dataframes as matrices
first, which is potentially a very memory expensive operation.
1 |
x |
The input matrix, vector, or dataframe. |
center |
Logical; should the data be centered first? (yes!) |
scale |
Logical; should the data be scaled first? (probably!) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.