Connect R and RStudio to Tidy Data Tutor.
You can install the development version of tidydatatutor from GitHub with:
# install.packages("remotes")
::install_github("seankross/tidydatatutor") remotes
Send a string of code to Tidy Data Tutor:
=
code "library(dplyr)
library(palmerpenguins)
penguins %>%
select(species, bill_length_mm) %>%
group_by(species) %>%
arrange(desc(bill_length_mm), .by_group = TRUE) %>%
slice(1)"
::go_code(code) tidydatatutor
Copy the following code into the clipboard:
library(dplyr)
library(palmerpenguins)
%>%
penguins select(species, bill_length_mm) %>%
group_by(species) %>%
arrange(desc(bill_length_mm), .by_group = TRUE) %>%
slice(1)
Then open it in Tidy Data Tutor by running this in the console:
::go_paste() tidydatatutor
Generate links to Tidy Data Tutor in R Markdown with named R code chunks:
---
output: md_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(message = FALSE)
library(tidydatatutor)
```
```{r mtcars-1}
library(dplyr)
mtcars %>%
select(mpg, cyl, hp) %>%
group_by(cyl) %>%
summarize(mean(hp))
```
[See this pipeline in Tidy Data Tutor](`r tdt_chunk("mtcars-1")`)
Access Tidy Data Tutor from the Addins drop down menu in RStudio: