tdt_chunk: Create a Link to Tidy Data Tutor from an R Code Chunk

Description Usage Arguments Value Examples

View source: R/tdt_url.R

Description

Create a Link to Tidy Data Tutor from an R Code Chunk

Usage

1
tdt_chunk(chunk)

Arguments

chunk

The name of an R code chunk in the current R Markdown document.

Value

A string with an appropriately formatted URL to Tidy Data Tutor.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 

<!--- In an R Markdown document: --->
```{r mtcars-1}
library(dplyr)

mtcars %>%
  select(mpg, cyl, hp) %>%
  group_by(cyl) %>%
  summarise(mean(hp))
```

[See this pipeline in Tidy Data Tutor](`r tdt_chunk("mtcars-1")`)

## End(Not run)

tidydatatutor documentation built on Dec. 10, 2021, 5:10 p.m.