Package 'tidydatatutor'

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]
Maintainer: Sean Kross <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-10-24 02:42:20 UTC
Source: https://github.com/seankross/tidydatatutor

Help Index


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)