Skip to content

Instantly share code, notes, and snippets.

@mine-cetinkaya-rundel
Created August 12, 2020 09:18
Show Gist options
  • Save mine-cetinkaya-rundel/93001f321c3f37bebbf1b3a971c3e71d to your computer and use it in GitHub Desktop.
Save mine-cetinkaya-rundel/93001f321c3f37bebbf1b3a971c3e71d to your computer and use it in GitHub Desktop.
learnr tutorial with hints
---
output: learnr::tutorial
runtime: shiny_prerendered
---
```{r setup, include=FALSE}
library(learnr)
```
## Exercise with Hint
Modify the following code to limit the number of rows printed to 5:
```{r print-limit, exercise=TRUE, exercise.eval=TRUE}
mtcars
```
```{r print-limit-hint-1}
What about head()?
```
```{r print-limit-hint-2}
head(mtcars)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment