Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hadley/tidy-tools

Building tidy tools in R, a workshop
https://github.com/hadley/tidy-tools

Last synced: 5 days ago
JSON representation

Building tidy tools in R, a workshop

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

# Tidy tools

Notes and live code for a 2-day workshop on "tidy tools". This workshop is (mostly) coded live. You can see the scripts I work from in [`script/`](script/), but I recommend not reading too far ahead because you'll find answers to some of the exercises, and you'll learn more if you try to work through them first.

Slides:

* [Intro to package development](1-intro.pdf)
* [Testing](2-testing.pdf)
* [Sharing](3-sharing.pdf)

## Setup

```{r, echo = FALSE, include = FALSE}
deps <- unique(sort(renv::dependencies()$Package))
deps <- setdiff(deps, c(
"ns", # created during class
"rmarkdown", "knitr", # only needed for .Rmd
"countdown", # only needed for instructor
"renv", # only needed for this block
"itdepends", # not on CRAN
"bizarro", # making it
c("stats", "MASS", "datasets"), # recommended
c("devtools", "roxygen2", "testthat"),
tidyverse::tidyverse_packages(),
NULL
))
install <- c(
'install.packages("devtools")',
paste0("install.packages(c(", paste0(encodeString(deps, quote = '"'), collapse = ", "), "))"),
'devtools::install_github("r-lib/itdepends")'
)
```
```{r code = install, eval = FALSE}
```

```{r, eval = FALSE}
# You may also need:
install.packages(c("ggplot2", "dplyr", "stringr"))

# And get the package we'll work with later:
usethis::create_from_github("hadley/fordogs", fork = FALSE)

# if you see an error about "unsupported protocol", try this:
usethis::create_from_github("hadley/fordogs", fork = FALSE, protocol = "https")
```