LinkedIn link GitHub link

R/Basel 2023

The regional R/Basel event took place at Roche on 21/07: Our presentation and impressions.

R/Basel 2023 is an useR! regional event that took place at Roche main campus. The agenda with talks and presentations can be found at the following link.

Basel is the Swiss head-quarter of the pharmaceutical industry, its pharma companies are making large use of R and are the main sponsors of the conference, which had therefore a focus on pharma topics and medical statistics, but attention was also placed on technical topics like Shiny and Quarto. It was one of the first events we attended after the pandemic, and it was a pleasure to be back together in person with the R community. The event was however accessible via live-streaming.

Basel

What happened?

It is worth mentioning the initial panel discussion, where some concern was expressed on the sponsorship that industries make to the Open Source world of R. What should the role of the industry in the R development be? How should they best contribute, given that they have an interest in the bright future of R? Some of these questions do not have an easy answer, in principle the Open Source world should be free from private investments, but without them it can’t really keep up with maintaining high standards.

The talks of the conference highlight the big impact the R ecosystem is making in the Pharma domain. Many R packages are grouped in a pharmaverse network which is the reference for R users in the area. Shiny is providing a tool to visualize results on Clinical Trials, and Quarto can be more successful than R Markdown for clinical reports.

Particular success received the package “randomizeR”, allowing more criteria for assigning randomization to several clinical trials.

On our side, we presented our experience in migrating to Quarto a live article based on R Markdown.

The main features of our Rmd app:

  • Visible in our GitHub as a Public repository
  • The repository is an R package, with an Rmd file rendered in the inst folder
  • The app was developed during the pandemic with the goal to provide a dashboard article analyzing the past 4 “weekly vaccination reports” from the Swiss Federal Office for Public Health (BAG)
  • Our article compares Vaccinated and Unvaccinated populations and verifies differences in the impact of Deaths and Hospitalized figures
  • It contains dynamic graphs (plotly), html tables (htmlTable) and Shiny components
  • Data are updated every week, through a workflow on GitHub Actions that rebuilds the data and commits them to the Repository
  • GitHub Actions perform CI on the R package, and CD to shinyapps.io

The Rmd app is deployed in our shinyapps.io.

Here some of our conclusions after the migration:

  • Easy conversion from rmd to qmd knitr::convert_chunk_header("inst/report/index.Rmd", output = "inst/report/index.qmd")
  • Package structure could be maintained
  • Adjustments in GitHub Actions required (Quarto Actions used)
  • Update in deployment script, function quarto_publish_app
  • Care required for the shiny content, use of #| context: server
  • shinyapps.io or Posit Connect are the solutions for publishing interactive documents

The new app is part of another forked repository on our GitHub.

Our general considerations on migrating to Quarto.

  • It is definitely worth starting new projects and documents using Quarto: configurations are centralized in a _quarto.yml file making their control easier and the change the layout, e.g., from Blog to Website feasible, presentations have more options with Quarto, and switching format from HTML to PDF is easier.

  • For applications similar to ours, Quarto does not add benefits from the architecture point of view, it allows however using more features in terms of layout, annotations, etc., therefore if you plan to develop an Rmd app farther and make it more user-friendly, you can benefit from a move to Quarto.

  • Pure R users do not have to be in a rush, however Quarto is likely to become the new standard and to be developed more.

The migrated app, with the Quarto report, is now deployed in our gallery replacing the Rmd version with few layout improvements.

It was great to be part again of an useR! regional conference like Basel R, such events can be really useful to bring together the local R community, to understand their challenges needs and goals, they also provide great chance for networking and for sharing ideas and concerns. We hope to have again the chance to attend and present a topic in future useR! events.

Find a list of the upcoming events on www.r-project.org/conferences/.