Title: | Send Your R Code to 'Tidy Data Tutor' |
Version: | 0.1.0 |
Description: | Visualize your 'Tidyverse' data analysis pipelines via the 'Tidy Data Tutor'(https://tidydatatutor.com/) web application. |
License: | MIT + file LICENSE |
URL: | https://github.com/seankross/tidydatatutor |
BugReports: | https://github.com/seankross/tidydatatutor/issues |
Encoding: | UTF-8 |
Imports: | clipr, knitr, rstudioapi |
RoxygenNote: | 7.1.2 |
Suggests: | rmarkdown, dplyr, testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2021-12-09 20:40:41 UTC; sean |
Author: | Sean Kross |
Maintainer: | Sean Kross <sean@seankross.com> |
Repository: | CRAN |
Date/Publication: | 2021-12-10 15:00:02 UTC |
Send Code in the RStudio Editor to Tidy Data Tutor
Description
Send Code in the RStudio Editor to Tidy Data Tutor
Usage
go()
Value
A string with an appropriately formatted URL to Tidy Data Tutor (invisibly).
Examples
## 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
Description
Send a Code String to Tidy Data Tutor
Usage
go_code(code)
Arguments
code |
A string of R code. |
Value
A string with an appropriately formatted URL to Tidy Data Tutor (invisibly).
Examples
## 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
Description
Send Code Copied to the Clipboard to Tidy Data Tutor
Usage
go_paste()
Value
A string with an appropriately formatted URL to Tidy Data Tutor (invisibly).
Examples
## 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
Description
Send Code Selected in the RStudio Editor to Tidy Data Tutor
Usage
go_selection()
Value
A string with an appropriately formatted URL to Tidy Data Tutor (invisibly).
Examples
## 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
Description
Create a Link to Tidy Data Tutor from an R Code Chunk
Usage
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
## 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
Description
Create a Link to Tidy Data Tutor from an R Code File
Usage
tdt_file(file)
Arguments
file |
The path to an R code file. |
Value
A string with an appropriately formatted URL to Tidy Data Tutor.
Examples
## 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
Description
Create a Link to Tidy Data Tutor
Usage
tdt_link(code)
Arguments
code |
A string or vector of strings containing R code. |
Value
A string with an appropriately formatted URL to Tidy Data Tutor.
Examples
## Not run:
code <- "library(dplyr)
Formaldehyde %>% mutate(Sum = carb + optden)"
tdt_link(code)
## End(Not run)