| d_map | R Documentation |
Apply an elementwise transformation lazily
d_map(x, f)
x |
A |
f |
A function or formula suitable for |
A delarr representing the transformation.
mat <- matrix(1:12, nrow = 3, ncol = 4)
darr <- delarr(mat)
# Apply elementwise transformation with formula
squared <- darr |> d_map(~ .x^2) |> collect()
squared
# Apply with function
logged <- darr |> d_map(log1p) |> collect()
logged
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.