center | R Documentation |
Center matrix columns or rows to 0
center(x, subset = NULL, byColumn = TRUE, scale = FALSE)
x |
A numeric matrix or data frame. A list of matrices or data frames can also be provided, where they will be cbind-ed to perform the centering. |
subset |
Encoded value of an index vector indicating the subset of individuals to consider. Default, NULL, all individuals are considered. |
byColumn |
A logical value indicating whether the input data is centered by column or row. Default, TRUE, centering by column. Constant variables across samples are removed. If FALSE, centering and scaling by row. Constant samples across variables are removed. |
scale |
A logical value indicating whether the variables should be scaled to have unit variance. Default, FALSE. |
The centered matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.