Skip to contents

Lifecycle: experimental

Lifecycle: experimental

bio is experimental. It is developed for a specific Biostatistics course and its user interface may change without a deprecation cycle. Several functions rewrite files that RStudio owns, so read Managing RStudio settings before running them on a machine you care about.

What bio is for

bio prepares and inspects the R and RStudio environment used in a Biostatistics course. It groups into three areas:

Area Typical question Vignette
Environment checks Is my software new enough? Checking your setup
RStudio configuration Can I get the classroom defaults? Managing RStudio settings
Projects and paths Where does RStudio keep this file? this vignette

Nothing in bio is required to use R — it exists to make a room full of laptops behave the same way.

Installation

bio and two of its dependencies are published through a drat repository rather than CRAN. The repository itself is available at mokymai/download:

repos <- c(
  mokymai = "https://mokymai.github.io/download/",
  CRAN = "https://cran.rstudio.com"
)

install.packages("bio", repos = repos)

DESCRIPTION declares that repository in Additional_repositories, so install.packages() resolves backup.tools and snippets from it too. See the R manual for details about installing packages.

A short tour

Start by confirming that the surrounding software is present:

Then look at where RStudio keeps the files bio may rewrite:

The open_*() counterparts open the same locations in a file manager:

Projects and project lists

RStudio keeps a list of recently opened projects. bio can read it, refresh the user-editable copy, and open a project by a name pattern:

open_project() matches pattern against the project names. When several projects match, it asks which one to open, so it is interactive by design.

Restarting

These require a running RStudio session; outside RStudio they report that and return without doing anything.

Where to go next

These projects overlap with or complement narrower parts of bio:

  • rstudio.prefs, by S.A. van der Wulp and Daniel D. Sjoberg, is the closest CRAN alternative for RStudio preference files and addin shortcuts.
  • rstudioapi, by Kevin Ushey, JJ Allaire, Hadley Wickham, and Gary Ritchie, provides the supported API for live RStudio integration.
  • renv, by Kevin Ushey and Hadley Wickham, manages reproducible project-local libraries and lockfiles; it complements bio::list_pkgs_used_in_dir().
  • styler, by Kirill Müller, Lorenz Walthert, and Indrajeet Patil, formats R code.
  • drat, by Dirk Eddelbuettel and Carl Boettiger, manages CRAN-like package repositories.

For the underlying platforms, use the official R manuals, RStudio IDE User Guide, and Quarto guide.