# Create a filter block
new_filter_block()
if (interactive()) {
# Basic usage with mtcars dataset
library(blockr.core)
serve(new_filter_block(), list(data = mtcars))
# With initial condition
serve(new_filter_block(
conditions = list(
list(column = "cyl", values = c(4, 6), mode = "include")
)
), list(data = mtcars))
# Connected blocks example
serve(
new_board(
blocks = list(
a = new_dataset_block(),
b = new_filter_block()
),
links = links(
from = c("a"),
to = c("b")
)
)
)
}
Run the code above in your browser using DataLab