| d_map2 | R Documentation |
Apply a binary elementwise transformation lazily
d_map2(x, y, f)
x |
A |
y |
Another |
f |
A function or formula combining two arguments. |
A delarr representing the fused binary operation.
mat1 <- matrix(1:12, nrow = 3, ncol = 4)
mat2 <- matrix(12:1, nrow = 3, ncol = 4)
darr1 <- delarr(mat1)
darr2 <- delarr(mat2)
# Binary operation between two delayed matrices
added <- d_map2(darr1, darr2, ~ .x + .y) |> collect()
added
# Binary operation with scalar
scaled <- d_map2(darr1, 10, ~ .x * .y) |> collect()
scaled
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.