Closed gadenbuie closed 1 year ago
Globally choose pipe characters, or set them per exercise. Default is chosen based on the current version of R in the rendering environment.
Supersedes #786
You can set the characters used for the pipe shortcut at the tutorial level with
knitr::opts_chunk$set(exercise.pipe = "%>%")
Or you can set the pipe option at the individual level using the exercise.pipe chunk option.
exercise.pipe
```{r base-pipe, exercise=TRUE, exercise.pipe="|>"} mtcars count(cyl)
By default, if not set otherwise set, learnr will use the base R pipe (`|>`) when the tutorial is rendered in R >= 4.1.0.
@gadenbuie thank you for this!
Globally choose pipe characters, or set them per exercise. Default is chosen based on the current version of R in the rendering environment.
Supersedes #786
You can set the characters used for the pipe shortcut at the tutorial level with
Or you can set the pipe option at the individual level using the
exercise.pipe
chunk option.