library(learnr) library(dplyr) knitr::opts_chunk$set(echo = FALSE)
Qu'est-ce qu'une pipe, sinon l'idée d'une pipe?
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.
````{verbatim echo = TRUE}
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.
In this next chunk, pressing Ctrl/Cmd + Shift + M
enters the magrittr pipe: %>%
.
mtcars count(cyl)
In this next chunk, pressing Ctrl/Cmd + Shift + M
enters the base R pipe: |>
.
mtcars count(cyl)
In this next chunk, pressing Ctrl/Cmd + Shift + M
enters the pipe that matches your R version. It's the base R pipe for R >= 4.1.
mtcars count(cyl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.