Open JohnCoene opened 1 month ago
@JohnCoene having a quick look at this, given that (transform) blocks are combined using magrittr pipes, standard syntax applies here. The following should work
new_blk <- function() {
new_block(
fields = list(),
expr = quote({
.$x <- 1L
.
}),
class = c("blk", "transform_block")
)
}
stack <- new_stack(
new_dataset_block("cars"),
new_blk()
)
serve_stack(stack)
Is this what you are after? Field values are substituted using bquote()
syntax, but "data" does not receive special treatment. This is handled by magrittr. For sure this should be better documented!
The copied code is not valid as it does not substitute
data
.E.g.: run app below, and try to run copied code.