A concept for a Swirl course to provide a package-by-package tour of R's popular tidyverse packages.
This repo is basically abandoned now, so try swirl-tidy by Seo-young Silvia Kim for a proper course that is way more complete.
Swirl is an interactive system for learning R from within R itself. At the console you're prompted for answers to challenges, like writing small R snippets and answering multi-choice questions, with feedback and hints provided as needed. Swirl courses are modular and anyone can create one.
This repo contains a Swirl course called Tidyswirl, with lessons about different packages in the tidyverse suite. Users are expected to be relative R beginners who are new to the tidyverse.
You can read a blog post about the creation of this course, which involved the {swirlify} package.
Run the following lines from the console to begin:
install.packages("swirl") # install Swirl package from CRAN
library(swirl) # attach Swirl
install_course_github("matt-dray", "tidyswirl") # install this course
swirl() # start Swirl
Swirl will provide instructions to you in the console. When prompted for a course, select tidyswirl
and then a specific lesson.
You can uninstall the course with uninstall_course("tidyswirl")
. You'll want to reinstall the course each time a change is made, which will be recorded in the NEWS.md file of this repo.
The initial scope is to create an opinionated lesson for each of the main tidyverse packages, demonstrating simple uses of common, stable functions. Think of it as a 'tasting menu' of the tidyverse.
Package | Functions included | Status |
---|---|---|
{tibble} | tibble() , tribble() , enframe() , add_row() , add _column() |
Useable |
{tidyr} | pivot_longer() , pivot_wider() , drop_na() , replace_na() , fill() , separate() , separate_rows() completed; nest() , unnest() , complete() , expand() in progress |
Useable |
{readr} | Not started | |
{dplyr} | Not started | |
{ggplot2} | Not started | |
{purrr} | Not started | |
{stringr} | Not started | |
{forcats} | Not started |
Packages from the wider tidyverse, like {lubridate} and {haven}, are also in scope.
Please leave an issue if you find a problem or have a suggestion.
You are also welcome to contribute, noting that there's a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
I recommend using the {swirlify} package to help create, edit and test your lessons.