knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The DoSS Toolkit is a bunch of self-paced modules to help you learn and use R.
We all know that R is a critical part of applied statistics and data science these days, but it can have a steep learning curve and be intimidating to get started with.
The Department of Statistical Sciences (DoSS) toolkit is a free series of open source online modules written by undergraduates, that their fellow students and the public can use to learn the essentials of R.
You use this resource by running R code! This may sound intimidating if you've never used R before, so we've made a video that walks through what you need to do.
Get started by going to R Studio Cloud - https://rstudio.cloud - and creating an account. When you've signed up, start a new project, and copy-paste the code below to install packages. (If you already have R and R Studio working on your local computer then you don't have to use R Studio Cloud, you can install the packages on your local machine instead.)
install.packages('tidyverse') install.packages('remotes') install.packages('opendatatoronto') remotes::install_github("rstudio-education/gradethis")
Then you can install the DoSStoolkit
:
remotes::install_github("RohanAlexander/DoSStoolkit")
You'll use the function run_tutorial
to run each module. At the moment we have nine modules. So you can pick one to start with. For instance, if you wanted to run the 'hello world' module then run:
learnr::run_tutorial("hello_world", package = "DoSStoolkit")
You can install DoSStoolkit
from GitHub with:
# install.packages("devtools") devtools::install_github("RohanAlexander/heapsofpapers") # install.packages('tidyverse') # install.packages('remotes') # install.packages('opendatatoronto') remotes::install_github("rstudio-education/gradethis")
Then you can install the DoSStoolkit
:
remotes::install_github("RohanAlexander/DoSStoolkit")
You'll use the function run_tutorial
to run each module. At the moment we have ten modules. So you can pick one to start with. For instance, if you wanted to run the 'hello world' module then run:
learnr::run_tutorial("hello_world", package = "DoSStoolkit")
We have ten modules. A complete collection is here:
learnr::run_tutorial("hello_world", package = "DoSStoolkit") learnr::run_tutorial("operating_in_an_error_prone_world", package = "DoSStoolkit") learnr::run_tutorial("holding_the_chaos_at_bay", package = "DoSStoolkit") learnr::run_tutorial("hand_me_my_plyrs", package = "DoSStoolkit") learnr::run_tutorial("totally_addicted_to_base", package = "DoSStoolkit") learnr::run_tutorial("he_was_a_d8er_boi", package = "DoSStoolkit") learnr::run_tutorial("to_ggplot_or_not_to_ggplot", package = "DoSStoolkit") learnr::run_tutorial("r_marky_markdown", package = "DoSStoolkit") learnr::run_tutorial("git_outta_here", package = "DoSStoolkit") learnr::run_tutorial("indistinguishable_from_magic", package = "DoSStoolkit")
How to run this module:
learnr::run_tutorial("hello_world", package = "DoSStoolkit")
Module content:
How to run this module:
learnr::run_tutorial("operating_in_an_error_prone_world", package = "DoSStoolkit")
Module content:
How to run this module:
learnr::run_tutorial("holding_the_chaos_at_bay", package = "DoSStoolkit")
Module content:
setwd()
, by Isaac Ehrlich.install.packages()
, by Haoluan Chen.install_github()
, by Haoluan Chen.library()
, by Mariam Walaa.update.packages()
, by Mariam Walaa.read_csv()
, by Marija Pejcinovska.read_table()
, read_dta()
, and other data types, by Isaac Ehrlich.How to run this module:
learnr::run_tutorial("hand_me_my_plyrs", package = "DoSStoolkit")
Module content:
select()
, by Yena Joo.filter()
, by Shirley Deng.group_by()
and ungroup()
, by Matthew Wankiewicz.summarise()
, by Mariam Walaa.arrange()
, by Isaac Ehrlich.mutate()
, by Haoluan Chen.pivot_wider()
and pivot_longer()
, by Annie Collins.rename()
, by Mariam Walaa.count()
and uncount()
, by Annie Collins.slice()
, by Annie Collins.c()
, matrix()
, data.frame()
, and tibble()
, by Matthew Wankiewicz.length()
, nrow()
, and ncol()
, by Isaac Ehrlich.How to run this module:
learnr::run_tutorial("totally_addicted_to_base", package = "DoSStoolkit")
Module content:
mean()
, median()
, sd()
, lm()
, and summary()
, by Mariam Walaa.function()
, by Haoluan Chen.for()
and while()
, by Yena Joo.if()
, if_else()
and case_when()
, by Haoluan Chen.c()
, seq()
, seq_along()
, and rep()
, by Matthew Wankiewicz.hist()
, plot()
, and boxplot()
, by Yena Joo.How to run this module:
learnr::run_tutorial("he_was_a_d8er_boi", package = "DoSStoolkit")
Module content:
head()
, tail()
, glimpse()
, and summary()
, written by Haoluan Chen.paste()
, paste0()
, glue::glue()
and stringr
, written by Marija Pejcinovskanames()
, rbind()
and cbind()
, written by Isaac Ehrlich.left_join()
, anti_join()
, full_join()
, etc, written by Haoluan Chen.set.seed()
, runif()
, rnorm()
, and sample()
, written by Haoluan Chen.pull()
, pluck()
, and unnest()
, by Isaac Ehrlich.forcats
and factors, written by Matthew Wankiewicz.janitor
, written by Mariam Walaa.tidyr
, written by Mariam Walaa.How to run this module:
learnr::run_tutorial("to_ggplot_or_not_to_ggplot", package = "DoSStoolkit")
Module content:
ggplot2::ggplot()
, by Shirley Deng.How to run this module:
learnr::run_tutorial("r_marky_markdown", package = "DoSStoolkit")
Module content:
kable
, kableextra
, gt
, written by Yena Joo.patchwork
, written by Michael Chonghere::here()
and filepaths, written by Matthew Wankiewicz.How to run this module:
learnr::run_tutorial("git_outta_here", package = "DoSStoolkit")
Module content:
How to run this module:
learnr::run_tutorial("indistinguishable_from_magic", package = "DoSStoolkit")
Module content:
ggmap
, by Annie Collins.Coming soon.
We gratefully acknowledge the support of Professor Bethany White, Chair Radu Craiu, and the U of T Faculty of Arts & Sciences Pedagogical Innovation and Experimentation Fund.
We'd like to acknowledge the help of:
We'd like to thank Alex Cookson for his collection of datasets.
This toolkit builds on, and complements, the work of many others, including:
Rohan would like to thank Greg Wilson, for sharing his experience, thoughts, and leadership.
We draw on the open-source statistical programming language R and a variety of packages. We are grateful for the work that we build on.
We have a pre-print coming soon.
The best way to contribute fixes and minor typos is to make a pull request on GitHub.
If you are interested in contributing lessons or modules, then please contact Rohan Alexander. We are particularly interested in partnering with an institution where the language of instruction is French to develop a French language version.
Please contact Rohan (rohan.alexander@utoronto.ca) with any questions, comments, and suggestions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.