Next Generation Shiny Apps with {bslib}

R/Medicine 2024

Online workshop at R/Medicine 2024
Tuesday, June 11, 2024
11:00am to 2:00pm

Introduction

Learn to build Shiny apps using modern user interfaces (UI) and layouts with bslib, the next generation of Shiny UI. We’ll cover stylish and convenient dashboard layouts and components as we showcase the ways in which bslib can replace shinydashboard.

Setup

📘 Website (you are here!)

🧑‍💻 Join Posit Cloud Space (Only for workshop participants)

📦 Repository

Using Posit Cloud

I’ve prepared a Posit Cloud workspace for workshop participants with a project for you to use during our time together. The project contains all of the files and packages pre-installed and ready to go. All you need to do is log in and start coding!

If you already have a Posit Cloud account, first join the rmedicine-2024-bslib space on Posit Cloud. Otherwise sign up for a free account and then join the space. You can create an account with your email or login with Google, GitHub or Clever.

Once you’re part of the rmedicine-2024-bslib space, select the rmedicine-2024-bslib assignment to create and launch a new project just for you.

Using Your Own Computer

If you prefer to use your own computer, you can clone the repository and install the necessary packages. I used R 4.4 but any recent version of R (>= 4.1) should work.

You can use the usethis package to quickly clone the repository:

usethis::create_from_github(
  "gadenbuie/rmedicine-2024-bslib",
  # Decide where to put the project here:
  destdir = "~/Desktop/rmedicine-2024-bslib"
)

This will download the repository and open the project in RStudio. Inside the project, use the renv package to install the necessary packages:

renv::restore()

For very speedy installation, I recommend telling renv to use pak to install packages:

Sys.setenv(RENV_CONFIG_PAK_ENABLED = "true")
renv::restore()