| d_scale | R Documentation |
Scale a delayed matrix along rows or columns
d_scale(
x,
dim = c("rows", "cols"),
axis = NULL,
center = TRUE,
scale = TRUE,
na.rm = FALSE
)
x |
A |
dim |
Dimension to scale. |
axis |
Integer axis for N-d arrays (alternative to |
center |
Logical; subtract the mean before scaling. |
scale |
Logical; divide by the standard deviation. |
na.rm |
Logical; remove missing values when computing statistics. |
A delarr with a deferred scaling operation.
mat <- matrix(c(1, 2, 3, 10, 20, 30), nrow = 2, ncol = 3)
darr <- delarr(mat)
# Scale rows (center and divide by SD)
scaled <- darr |> d_scale(dim = "rows") |> collect()
scaled
# Scale without centering
scaled_only <- darr |> d_scale(dim = "rows", center = FALSE) |> collect()
scaled_only
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.