gadenbuie / sprinkles

Utility CSS and JavaScript for R Markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advanced code chunks

gadenbuie opened this issue · comments

The RStudio Package Manager page has a really neat code chunk component. It'd be awesome to bring something like this to R Markdown. We could add a ▶️ button next to the ℹ️ button that would toggle the output chunk, and it'd be nice to have a special syntax for the chunk label and extra info, maybe roxygen2 style title and description comments.

```{r label, pretty_chunk = TRUE}
#' Install system prerequisites for Ubuntu 20.04 (Focal)
#' 
#' Known system prerequisites are automatically detected from the package's 
#' system requirements information. The [admin guide](https://packagemanager.rstudio.com/__docs__/admin/appendix/system-dependency-detection/) 
#' provides additional information on system dependency detection, 
#' limitations, or how to report missing information.

apt-get install -y libcurl4-openssl-dev
apt-get install -y libssl-dev
```

image

image