Skip to contents

blockr.dag

An interative network library provided by g6R can be used as front-end to a blockr board using this package.

Installation

You can install the development version of blockr.dag from GitHub with:

# install.packages("pak")
pak::pak("BristolMyersSquibb/blockr.dag")

Example

To start up a board with the dag extension, run the following code:

library(blockr.dag)
library(blockr.core)
library(blockr.dock)

options(
  "g6R.mode" = "dev",
  #"g6R.layout_on_data_change" = TRUE,
  "g6R.preserve_elements_position" = TRUE
)

serve(
  new_dock_board(
    blocks = c(
      a = new_dataset_block("iris"),
      b = new_scatter_block(x = "Sepal.Length", y = "Sepal.Width")
    ),
    links = list(from = "a", to = "b", input = "data"),
    stacks = c(
      stack_1 = new_dock_stack(c("a", "b"), color = "#0000FF"),
      stack_2 = new_dock_stack()
    ),
    extensions = new_dag_extension()
  )
)

Note

The demo below runs with shinylive. Not all feature may work as expected due to compatibility issues with webR.