colscale | R Documentation |
Apply the equivalent of scale
to either columns or rows of a matrix, using a grouping variable.
## S4 method for signature 'ANY'
colscale(x, center=TRUE, scale=TRUE,
group = NULL, ..., BPPARAM = bpparam())
## S4 method for signature 'ANY'
rowscale(x, center=TRUE, scale=TRUE,
group = NULL, ..., BPPARAM = bpparam())
x |
A matrix-like object. |
center |
Either a logical value or a numeric vector of length equal to the number of columns of 'x' (for |
scale |
Either a logical value or a numeric vector of length equal to the number of columns of 'x' (for |
group |
A vector or factor giving the groupings with length equal to the number of rows of 'x' (for |
... |
Arguments passed to |
BPPARAM |
An optional instance of |
See scale
for details.
A matrix-like object (usually of the same class as x
) with either ‘col-scaled:center’ and ‘col-scaled:scale’ attributes or ‘row-scaled:center’ and ‘row-scaled:scale’ attributes.
Kylie A. Bemis
scale
x <- matter(1:100, nrow=10, ncol=10)
colscale(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.