| Title: | Send Your R Code to 'Tidy Data Tutor' |
|---|---|
| Description: | Visualize your 'Tidyverse' data analysis pipelines via the 'Tidy Data Tutor'(<https://tidydatatutor.com/>) web application. |
| Authors: | Sean Kross [aut, cre] (ORCID: <https://orcid.org/0000-0001-5215-0316>) |
| Maintainer: | Sean Kross <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-04 08:48:30 UTC |
| Source: | https://github.com/seankross/tidydatatutor |
Send Code in the RStudio Editor to Tidy Data Tutor
go()go()
A string with an appropriately formatted URL to Tidy Data Tutor (invisibly).
## Not run: # Copy the following code into an open RStudio editor: library(dplyr) library(palmerpenguins) penguins %>% select(species, bill_length_mm) %>% group_by(species) %>% arrange(desc(bill_length_mm), .by_group = TRUE) %>% slice(1) # Then run this in the console: tidydatatutor::go() ## End(Not run)## Not run: # Copy the following code into an open RStudio editor: library(dplyr) library(palmerpenguins) penguins %>% select(species, bill_length_mm) %>% group_by(species) %>% arrange(desc(bill_length_mm), .by_group = TRUE) %>% slice(1) # Then run this in the console: tidydatatutor::go() ## End(Not run)
Send a Code String to Tidy Data Tutor
go_code(code)go_code(code)
code |
A string of R code. |
A string with an appropriately formatted URL to Tidy Data Tutor (invisibly).
## Not run: code = "library(dplyr) library(palmerpenguins) penguins %>% select(species, bill_length_mm) %>% group_by(species) %>% arrange(desc(bill_length_mm), .by_group = TRUE) %>% slice(1)" tidydatatutor::go_code(code) ## End(Not run)## Not run: code = "library(dplyr) library(palmerpenguins) penguins %>% select(species, bill_length_mm) %>% group_by(species) %>% arrange(desc(bill_length_mm), .by_group = TRUE) %>% slice(1)" tidydatatutor::go_code(code) ## End(Not run)
Send Code Copied to the Clipboard to Tidy Data Tutor
go_paste()go_paste()
A string with an appropriately formatted URL to Tidy Data Tutor (invisibly).
## Not run: # 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 run this in the console: tidydatatutor::go_paste() ## End(Not run)## Not run: # 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 run this in the console: tidydatatutor::go_paste() ## End(Not run)
Send Code Selected in the RStudio Editor to Tidy Data Tutor
go_selection()go_selection()
A string with an appropriately formatted URL to Tidy Data Tutor (invisibly).
## Not run: # Select some pipeline code in the RStudio editor, # then run this in the console: tidydatatutor::go_selection() ## End(Not run)## Not run: # Select some pipeline code in the RStudio editor, # then run this in the console: tidydatatutor::go_selection() ## End(Not run)
Create a Link to Tidy Data Tutor from an R Code Chunk
tdt_chunk(chunk)tdt_chunk(chunk)
chunk |
The name of an R code chunk in the current R Markdown document. |
A string with an appropriately formatted URL to Tidy Data Tutor.
## 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)## 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)
Create a Link to Tidy Data Tutor from an R Code File
tdt_file(file)tdt_file(file)
file |
The path to an R code file. |
A string with an appropriately formatted URL to Tidy Data Tutor.
## Not run: r_code_file <- system.file("test", "test-1.R", package = "tidydatatutor") tdt_file(r_code_file) ## End(Not run)## Not run: r_code_file <- system.file("test", "test-1.R", package = "tidydatatutor") tdt_file(r_code_file) ## End(Not run)
Create a Link to Tidy Data Tutor
tdt_link(code)tdt_link(code)
code |
A string or vector of strings containing R code. |
A string with an appropriately formatted URL to Tidy Data Tutor.
## Not run: code <- "library(dplyr) Formaldehyde %>% mutate(Sum = carb + optden)" tdt_link(code) ## End(Not run)## Not run: code <- "library(dplyr) Formaldehyde %>% mutate(Sum = carb + optden)" tdt_link(code) ## End(Not run)