# Create a mutate expression block
new_mutate_expr_block(exprs = list(mpg_squared = "mpg^2"))
if (interactive()) {
# Basic usage with mtcars datase
library(blockr.core)
serve(new_mutate_expr_block(), data = list(data = mtcars))
# With a custom dataset
df <- data.frame(x = 1:5, check.names = FALSE)
df$`2025 Sales` <- letters[1:5]
serve(new_mutate_expr_block(), data = list(data = df))
}
Run the code above in your browser using DataLab