Skip to content

Install blockr ​

blockr is free and open source, released under GPL-3.0.

You need R 4.5 or later. The tutorials use the penguins dataset, which R ships from version 4.5 on.

To try blockr without installing anything, open the Playground on blockr.cloud. In an organisation, blockr usually runs on its own server, such as Posit Connect or ShinyProxy. For organisations has the details.

Install and launch ​

r
# install.packages("pak")
pak::pak("BristolMyersSquibb/blockr@dev")
blockr::run_app()

This installs blockr and the packages the tutorials use, from GitHub: blockr.core, blockr.dock, blockr.dag, blockr.dplyr, blockr.ggplot, blockr.io, blockr.ui, blockr.viz, blockr.dm, blockr.script, blockr.session and blockr.assistant. No GitHub token is needed.

run_app() opens an empty board in your browser. The Workflow canvas sits on the left: right-click it and choose "Add block" to start.

Next: Build your first app.

Turn on the assistant ​

The assistant is a chat panel that builds and changes blocks for you (The AI assistant). It talks to a language model through ellmer. By default it uses ellmer::chat_openai(), which reads the OPENAI_API_KEY environment variable. Add the assistant next to the Workflow canvas:

r
library(blockr)
run_app(
  extensions = list(
    new_dag_extension(),
    blockr.assistant::new_assistant_extension()
  )
)

An "Assistant" tab appears in the rail below "Workflow".

For another provider, set the blockr.chat_function option before run_app(). ellmer's setup guide lists the providers and their keys. For Claude:

r
options(
  blockr.chat_function = function(system_prompt = NULL, params = NULL) {
    ellmer::chat_anthropic(system_prompt = system_prompt, params = params)
  }
)

More packages ​

Domain packages such as blockr.pharma or blockr.stats are separate installs, for example pak::pak("BristolMyersSquibb/blockr.pharma"). The package overview lists them.