├── .Rbuildignore ├── .gitignore ├── .nojekyll ├── DESCRIPTION ├── DoSStoolkit.Rproj ├── LICENSE ├── LICENSE.md ├── NAMESPACE ├── R └── hello.R ├── README.Rmd ├── README.md ├── _pkgdown.yml ├── docs ├── .nojekyll ├── 404.html ├── CNAME ├── LICENSE-text.html ├── LICENSE.html ├── authors.html ├── bootstrap-toc.css ├── bootstrap-toc.js ├── docsearch.css ├── docsearch.js ├── index.html ├── link.svg ├── pkgdown.css ├── pkgdown.js ├── pkgdown.yml └── reference │ ├── Rplot001.png │ ├── figures │ ├── stitches_brown_hex.png │ ├── stitches_green_hex.png │ ├── stitches_hex_all.png │ ├── stitches_white_hex.png │ └── stitches_yellow_hex.png │ ├── hello.html │ └── index.html ├── inst ├── extdata │ ├── childrens-books.txt │ ├── covid_data.csv │ └── temperatures-modern.csv └── tutorials │ ├── git_outta_here │ ├── git_outta_here.Rmd │ └── images │ │ ├── 64_add-commit-push.PNG │ │ ├── 64_git-init.PNG │ │ ├── 64_git-status.PNG │ │ ├── 69_logo_stackoverflow.png │ │ ├── 69_reprex_example.png │ │ └── 69_stackoverflow_search.png │ ├── hand_me_my_plyrs │ ├── hand_me_my_plyrs.Rmd │ └── images │ │ ├── 32_culmen_depth.png │ │ └── 32_penguins.png │ ├── he_was_a_d8er_boi │ ├── he_was_a_d8er_boi.Rmd │ └── images │ │ ├── 59_tidy-data-2.jpg │ │ └── 59_tidy-data.jpg │ ├── hello_world │ ├── hello_world.Rmd │ └── images │ │ ├── 01-getting_started_1.png │ │ ├── 01-getting_started_2.png │ │ ├── 01-getting_started_3.png │ │ ├── 01-getting_started_4.png │ │ ├── 01-getting_started_5.png │ │ ├── 01-getting_started_6.png │ │ ├── 01-getting_started_7.png │ │ └── 02-rstudio-layout.png │ ├── holding_the_chaos_at_bay │ ├── holding_the_chaos_at_bay.Rmd │ └── images │ │ ├── 17_packages.png │ │ ├── 20_updating-libraries-1.PNG │ │ ├── 20_updating-libraries-2.PNG │ │ ├── folder-setup.png │ │ ├── r-project-example.png │ │ └── setwd.png │ ├── indistinguishable_from_magic │ ├── 64-covid-testing-locations.csv │ ├── images │ │ ├── 64-coordinates-map.png │ │ ├── 64-google-1.png │ │ ├── 64-google-2.png │ │ ├── 64-google-3.png │ │ ├── 84-new_site_1.png │ │ ├── 84-new_site_2.png │ │ ├── 84-new_site_3.png │ │ └── 84-new_site_4.png │ └── indistinguishable_from_magic.Rmd │ ├── operating_in_an_error_prone_world │ ├── images │ │ ├── 06_arrival-1.png │ │ ├── 06_arrival-2.png │ │ ├── 06_arrival_1.png │ │ ├── 06_arrival_2.png │ │ ├── 07_google-dates.png │ │ ├── 07_google-tools.png │ │ ├── 07_stack-screenshot.png │ │ ├── 08_troubleshooting-image.png │ │ ├── 69_logo_stackoverflow.png │ │ ├── 69_reprex_example.png │ │ ├── 69_stackoverflow_search.png │ │ ├── add-commit-push.PNG │ │ ├── culmen_depth.png │ │ ├── folder-setup.png │ │ ├── git-init.PNG │ │ ├── git-status.PNG │ │ ├── packages.png │ │ ├── penguins.png │ │ ├── r-project-example.png │ │ └── setwd.png │ └── operating_in_an_error_prone_world.Rmd │ ├── r_marky_markdown │ ├── images │ │ └── 69_markdown.png │ └── r_marky_markdown.Rmd │ ├── to_ggplot_or_not_to_ggplot │ ├── images │ │ ├── 64-crime-density-1.png │ │ ├── 64-crime-density-facet-1.png │ │ └── 64-crime-scatter-1.png │ └── to_ggplot_or_not_to_ggplot.Rmd │ └── totally_addicted_to_base │ └── totally_addicted_to_base.Rmd └── man ├── figures ├── stitches_brown_hex.png ├── stitches_green_hex.png ├── stitches_hex_all.png ├── stitches_white_hex.png └── stitches_yellow_hex.png └── hello.Rd /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | ^_pkgdown\.yml$ 4 | ^docs$ 5 | ^pkgdown$ 6 | ^LICENSE\.md$ 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # History files 4 | .Rhistory 5 | .Rapp.history 6 | 7 | # Session Data files 8 | .RData 9 | 10 | # User-specific files 11 | .Ruserdata 12 | 13 | # Example code in package build process 14 | *-Ex.R 15 | 16 | # Output files from R CMD build 17 | /*.tar.gz 18 | 19 | # Output files from R CMD check 20 | /*.Rcheck/ 21 | 22 | # RStudio files 23 | .Rproj.user/ 24 | 25 | # produced vignettes 26 | vignettes/*.html 27 | vignettes/*.pdf 28 | 29 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 30 | .httr-oauth 31 | 32 | # knitr and R markdown default cache directories 33 | *_cache/ 34 | /cache/ 35 | 36 | # Temporary files created by R markdown 37 | *.utf8.md 38 | *.knit.md 39 | 40 | # R Environment Variables 41 | .Renviron 42 | # docs 43 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/.nojekyll -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: DoSStoolkit 2 | Type: Package 3 | Title: Self-Paced Modules to Help You Learn R 4 | Version: 0.2.0 5 | Authors@R: c( 6 | person(given = "Rohan", 7 | family = "Alexander", 8 | role = c("aut", "cre"), 9 | email = "rohan.alexander@utoronto.ca", 10 | comment = c(ORCID = "0000-0003-1279-0700")), 11 | person(given = "Samantha-Jo", 12 | family = "Caetano", 13 | role = c("aut")), 14 | person(given = "Annie" , 15 | family = "Collins", 16 | role = c("aut")), 17 | person(given = "Haoluan" , 18 | family = "Chen", 19 | role = c("aut")), 20 | person(given = "Isaac" , 21 | family = "Ehrlich", 22 | role = c("aut")), 23 | person(given = "Mariam" , 24 | family = "Walaa", 25 | role = c("aut")), 26 | person(given = "Marija" , 27 | family = "Pejcinovska", 28 | role = c("aut")), 29 | person(given = "Matthew" , 30 | family = "Wankiewicz", 31 | role = c("aut")), 32 | person(given = "Michael" , 33 | family = "Chong", 34 | role = c("aut")), 35 | person(given = "Paul" , 36 | family = "Hodgetts", 37 | role = c("aut")), 38 | person(given = "Shirley" , 39 | family = "Deng", 40 | role = c("aut")), 41 | person(given = "Yena" , 42 | family = "Joo", 43 | role = c("aut")) 44 | ) 45 | Maintainer: Rohan Alexander 46 | Description: This is a collection of learnR modules written by students at the Department of Statistical Sciences (DoSS) to help other students learn R. 47 | License: MIT + file LICENSE 48 | Encoding: UTF-8 49 | LazyData: true 50 | Roxygen: list(markdown = TRUE) 51 | RoxygenNote: 7.1.1 52 | URL: https://github.com/RohanAlexander/DoSStoolkit 53 | BugReports: https://github.com/RohanAlexander/DoSStoolkit/issues 54 | Imports: 55 | blogdown, 56 | dplyr, 57 | flair, 58 | ggmap, 59 | ggplot2, 60 | ggpubr, 61 | glue, 62 | gt, 63 | here, 64 | janitor, 65 | kableExtra, 66 | knitr, 67 | learnr, 68 | lubridate, 69 | opendatatoronto, 70 | palmerpenguins, 71 | patchwork, 72 | scales, 73 | sortable, 74 | stringr 75 | Depends: 76 | tidyverse 77 | -------------------------------------------------------------------------------- /DoSStoolkit.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Package 19 | PackageUseDevtools: Yes 20 | PackageInstallArgs: --no-multiarch --with-keep.source 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | YEAR: 2021 2 | COPYRIGHT HOLDER: Rohan Alexander 3 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | Copyright (c) 2021 Rohan Alexander 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | exportPattern("^[[:alpha:]]+") 2 | -------------------------------------------------------------------------------- /R/hello.R: -------------------------------------------------------------------------------- 1 | # Hello, world! 2 | # 3 | # This is an example function named 'hello' 4 | # which prints 'Hello, world!'. 5 | # 6 | # You can learn more about package authoring with RStudio at: 7 | # 8 | # http://r-pkgs.had.co.nz/ 9 | #e 10 | # Some useful keyboard shortcuts for package authoring: 11 | # 12 | # Install Package: 'Cmd + Shift + B' 13 | # Check Package: 'Cmd + Shift + E' 14 | # Test Package: 'Cmd + Shift + T' 15 | 16 | hello <- function() { 17 | print("Hello, world!") 18 | } 19 | -------------------------------------------------------------------------------- /README.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: github_document 3 | --- 4 | 5 | 6 | 7 | ```{r, include = FALSE} 8 | knitr::opts_chunk$set( 9 | collapse = TRUE, 10 | comment = "#>", 11 | fig.path = "man/figures/README-", 12 | out.width = "100%" 13 | ) 14 | ``` 15 | 16 | ## DoSStoolkit 17 | 18 | The DoSS Toolkit is a bunch of self-paced modules to help you learn and use R. 19 | 20 | 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. 21 | 22 | The [Department of Statistical Sciences](http://www.utstat.utoronto.ca/) (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. 23 | 24 | 25 | ## How to use this resource 26 | 27 | ### If you have never used R before 28 | 29 | 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. 30 | 31 | 32 | 33 | 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.) 34 | 35 | ```{r, eval = FALSE} 36 | install.packages('tidyverse') 37 | install.packages('remotes') 38 | install.packages('opendatatoronto') 39 | remotes::install_github("rstudio-education/gradethis") 40 | ``` 41 | 42 | Then you can install the `DoSStoolkit`: 43 | 44 | ```{r, eval = FALSE} 45 | remotes::install_github("RohanAlexander/DoSStoolkit") 46 | ``` 47 | 48 | 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: 49 | 50 | ```{r, eval = FALSE} 51 | learnr::run_tutorial("hello_world", package = "DoSStoolkit") 52 | ``` 53 | 54 | 55 | ### If you already have R and R Studio on your computer 56 | 57 | You can install `DoSStoolkit` from [GitHub](https://github.com/) with: 58 | 59 | ```{r, eval = FALSE} 60 | # install.packages("devtools") 61 | devtools::install_github("RohanAlexander/heapsofpapers") 62 | 63 | # install.packages('tidyverse') 64 | # install.packages('remotes') 65 | # install.packages('opendatatoronto') 66 | remotes::install_github("rstudio-education/gradethis") 67 | ``` 68 | 69 | Then you can install the `DoSStoolkit`: 70 | 71 | ```{r, eval = FALSE} 72 | remotes::install_github("RohanAlexander/DoSStoolkit") 73 | ``` 74 | 75 | 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: 76 | 77 | ```{r, eval = FALSE} 78 | learnr::run_tutorial("hello_world", package = "DoSStoolkit") 79 | ``` 80 | 81 | 82 | ## Content 83 | 84 | We have ten modules. A complete collection is here: 85 | 86 | ```{r, eval = FALSE} 87 | learnr::run_tutorial("hello_world", package = "DoSStoolkit") 88 | learnr::run_tutorial("operating_in_an_error_prone_world", package = "DoSStoolkit") 89 | learnr::run_tutorial("holding_the_chaos_at_bay", package = "DoSStoolkit") 90 | learnr::run_tutorial("hand_me_my_plyrs", package = "DoSStoolkit") 91 | learnr::run_tutorial("totally_addicted_to_base", package = "DoSStoolkit") 92 | learnr::run_tutorial("he_was_a_d8er_boi", package = "DoSStoolkit") 93 | learnr::run_tutorial("to_ggplot_or_not_to_ggplot", package = "DoSStoolkit") 94 | learnr::run_tutorial("r_marky_markdown", package = "DoSStoolkit") 95 | learnr::run_tutorial("git_outta_here", package = "DoSStoolkit") 96 | learnr::run_tutorial("indistinguishable_from_magic", package = "DoSStoolkit") 97 | ``` 98 | 99 | 100 | ### Hello world! 101 | 102 | How to run this module: 103 | 104 | ```{r, eval = FALSE} 105 | learnr::run_tutorial("hello_world", package = "DoSStoolkit") 106 | ``` 107 | 108 | Module content: 109 | 110 | - Why I love R, by Liza Bolton. 111 | - Setting up RStudio, by Annie Collins. 112 | - Getting to know what is what - console, terminal, etc, by Annie Collins. 113 | - A fun hello world exercise, by Annie Collins. 114 | - Another fun hello world exercise, by Shirley Deng. 115 | - R Weekly newsletter, R Ladies, R meetups, by Annie Collins. 116 | 117 | ### Operating in an error prone world 118 | 119 | How to run this module: 120 | 121 | ```{r, eval = FALSE} 122 | learnr::run_tutorial("operating_in_an_error_prone_world", package = "DoSStoolkit") 123 | ``` 124 | 125 | Module content: 126 | 127 | - Why I love R, by Monica Alexander. 128 | - Getting help is normal, by Michael Chong. 129 | - Using Google and Stack Overflow, by Michael Chong. 130 | - Stack overflow, by Annie Collins. 131 | - How to problem solve when your code doesn't work, by Michael Chong. 132 | - Making reproducible examples, by Marija Pejcinovska. 133 | - How to make the most of R's cryptic error messages, by Shirley Deng. 134 | 135 | ### Holding the chaos at bay 136 | 137 | How to run this module: 138 | 139 | ```{r, eval = FALSE} 140 | learnr::run_tutorial("holding_the_chaos_at_bay", package = "DoSStoolkit") 141 | ``` 142 | 143 | Module content: 144 | 145 | - Why I love R, by Samantha-Jo Caetano. 146 | - R projects and `setwd()`, by Isaac Ehrlich. 147 | - Folder set-up, by Isaac Ehrlich. 148 | - Writing comments, by Isaac Ehrlich. 149 | - `install.packages()`, by Haoluan Chen. 150 | - `install_github()`, by Haoluan Chen. 151 | - `library()`, by Mariam Walaa. 152 | - `update.packages()`, by Mariam Walaa. 153 | - `read_csv()`, by Marija Pejcinovska. 154 | - `read_table()`, `read_dta()`, and other data types, by Isaac Ehrlich. 155 | 156 | ### Hand me my plyrs 157 | 158 | How to run this module: 159 | 160 | ```{r, eval = FALSE} 161 | learnr::run_tutorial("hand_me_my_plyrs", package = "DoSStoolkit") 162 | ``` 163 | 164 | Module content: 165 | 166 | - Why I love R, by Sabrina Sixta. 167 | - What is the tidyverse?, by Yena Joo. 168 | - The pipe, by Mariam Walaa. 169 | - `select()`, by Yena Joo. 170 | - `filter()`, by Shirley Deng. 171 | - `group_by()` and `ungroup()`, by Matthew Wankiewicz. 172 | - `summarise()`, by Mariam Walaa. 173 | - `arrange()`, by Isaac Ehrlich. 174 | - `mutate()`, by Haoluan Chen. 175 | - `pivot_wider()` and `pivot_longer()`, by Annie Collins. 176 | - `rename()`, by Mariam Walaa. 177 | - `count()` and `uncount()`, by Annie Collins. 178 | - `slice()`, by Annie Collins. 179 | - `c()`, `matrix()`, `data.frame()`, and `tibble()`, by Matthew Wankiewicz. 180 | - `length()`, `nrow()`, and `ncol()`, by Isaac Ehrlich. 181 | 182 | 183 | ### Totally addicted to base 184 | 185 | How to run this module: 186 | 187 | ```{r, eval = FALSE} 188 | learnr::run_tutorial("totally_addicted_to_base", package = "DoSStoolkit") 189 | ``` 190 | 191 | Module content: 192 | 193 | - Why I love R, by Rohan Alexander. 194 | - `mean()`, `median()`, `sd()`, `lm()`, and `summary()`, by Mariam Walaa. 195 | - `function()`, by Haoluan Chen. 196 | - `for()` and `while()`, by Yena Joo. 197 | - `if()`, `if_else()` and `case_when()`, by Haoluan Chen. 198 | - `c()`, `seq()`, `seq_along()`, and `rep()`, by Matthew Wankiewicz. 199 | - `hist()`, `plot()`, and `boxplot()`, by Yena Joo. 200 | 201 | ### He was a d8er boi 202 | 203 | How to run this module: 204 | 205 | ```{r, eval = FALSE} 206 | learnr::run_tutorial("he_was_a_d8er_boi", package = "DoSStoolkit") 207 | ``` 208 | 209 | Module content: 210 | 211 | - `head()`, `tail()`, `glimpse()`, and `summary()`, written by Haoluan Chen. 212 | - `paste()`, `paste0()`, `glue::glue()` and `stringr`, written by Marija Pejcinovska 213 | - `names()`, `rbind()` and `cbind()`, written by Isaac Ehrlich. 214 | - `left_join()`, `anti_join()`, `full_join()`, etc, written by Haoluan Chen. 215 | - Looking for missing data, written by Mariam Walaa. 216 | - `set.seed()`, `runif()`, `rnorm()`, and `sample()`, written by Haoluan Chen. 217 | - Simulating datasets for regression, written by Mariam Walaa. 218 | - Advanced mutating and summarising, written by Mariam Walaa. 219 | - Tidying up datasets, written by Mariam Walaa. 220 | - `pull()`, `pluck()`, and `unnest()`, by Isaac Ehrlich. 221 | - `forcats` and factors, written by Matthew Wankiewicz. 222 | - More on strings, written by Annie Collins. 223 | - Regular expressions, written by Shirley Deng. 224 | - Working with dates, written by Mariam Walaa. 225 | - `janitor`, written by Mariam Walaa. 226 | - `tidyr`, written by Mariam Walaa. 227 | 228 | ### To ggplot or not to ggplot 229 | 230 | How to run this module: 231 | 232 | ```{r, eval = FALSE} 233 | learnr::run_tutorial("to_ggplot_or_not_to_ggplot", package = "DoSStoolkit") 234 | ``` 235 | 236 | Module content: 237 | 238 | - `ggplot2::ggplot()`, by Shirley Deng. 239 | - Bar charts, by Matthew Wankiewicz. 240 | - Histograms, by Haoluan Chen. 241 | - Scatter plots, by Haoluan Chen. 242 | - Various useful options, by Yena Joo. 243 | - Saving graphs, by Yena Joo. 244 | 245 | ### R Marky Markdown and the Funky Docs 246 | 247 | How to run this module: 248 | 249 | ```{r, eval = FALSE} 250 | learnr::run_tutorial("r_marky_markdown", package = "DoSStoolkit") 251 | ``` 252 | 253 | Module content: 254 | 255 | - Introduction to R Markdown, written by Shirley Deng. 256 | - Top Matter: Title, Date, Author, Abstract, written by Yena Joo. 257 | - Tables: `kable`, `kableextra`, `gt`, written by Yena Joo. 258 | - Multiple plots with `patchwork`, written by Michael Chong 259 | - References and Bibtex, written by Yena Joo. 260 | - PDF outputs, written by Yena Joo. 261 | - `here::here()` and filepaths, written by Matthew Wankiewicz. 262 | 263 | ### Git outta here 264 | 265 | How to run this module: 266 | 267 | ```{r, eval = FALSE} 268 | learnr::run_tutorial("git_outta_here", package = "DoSStoolkit") 269 | ``` 270 | 271 | Module content: 272 | 273 | - What is version control and GitHub?, written by Mariam Walaa. 274 | - Git: pull, status, add, commit, push, written by Mariam Walaa. 275 | - Branches in GitHub, written by Matthew Wankiewicz. 276 | - Dealing with Conflicts, written by Matthew Wankiewicz. 277 | - Putting (G)it All together in RStudio, written by Matthew Wankiewicz. 278 | 279 | ### Indistinguishable from magic 280 | 281 | How to run this module: 282 | 283 | ```{r, eval = FALSE} 284 | learnr::run_tutorial("indistinguishable_from_magic", package = "DoSStoolkit") 285 | ``` 286 | 287 | Module content: 288 | 289 | - Coding style, written by Marija Pejcinovska. 290 | - Static maps with `ggmap`, by Annie Collins. 291 | - Writing R Packages, written by Matthew Wankiewicz. 292 | - Getting started with Blogdown, written by Annie Collins. 293 | - Getting started with Shiny, written by Matthew Wankiewicz. 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | ## Contributors 303 | 304 | - Annie Collins is an undergraduate student in the Department of Mathematics specializing in applied mathematics and statistics with a minor in history and philosophy of science. In her free time, she focuses her efforts on student governance, promoting women's representation in STEM, and working with data in the non-profit and charitable sector. 305 | - Haoluan Chen is an undergraduate student in the Department of Statistical Science specializing in applied statistics. He is interested in applying data science techniques, especially in NLP, to gain insight from the data. 306 | - Isaac Ehrlich is an undergraduate student in Statistics and Cognitive Science at the University of Toronto. He enjoys using R for everything from analysing trends in his recent movie-viewing history, to his past research building models on human categorization. 307 | - Mariam Walaa is an undergraduate student in the Department of Computer and Mathematical Sciences at University of Toronto Scarborough, majoring in Mathematics and minoring in GIS and statistics. Mariam enjoys learning about how to work with data such as spatial and text data to extract insights. 308 | - Marija Pejcinovska is a graduate student in the Department of Statistical Sciences. Her research is motivated by modelling challenges that arise with "complicated" data (sparse/highly biased/poor quality data), usually in the context of social or health inequalities. 309 | - Matthew Wankiewicz is an undergraduate student at the University of Toronto, majoring in Statistics and minoring in Mathematics and the History and Philosophy of Science. 310 | - Michael Chong is a graduate student in the Department of Statistical Sciences. His research aims to build statistical models for demographic estimation in contexts where high quality data are unavailable. There is almost always an active R session on his computer! 311 | - Paul Hodgetts is a Master of Information candidate concentrating in Human-Centred Data Science in the Faculty of Information, University of Toronto. He sincerely believes that Calvin and Hobbes is the greatest comic ever produced. 312 | - Rohan Alexander is an assistant professor in the Faculty of Information and the Department of Statistical Sciences. Some people convert to catholicism upon marriage, Rohan converted to R. His greatest professional achievement is probably getting a pull request accepted into R for Data Science (it was just fixing a minor typo but still). 313 | - Samantha-Jo Caetano is an assistant professor (teaching stream) in the Department of Statistical Sciences. She loves statistics, socializing, her family, and her dogs, not necessarily in that order. 314 | - Shirley Deng is an undergraduate student specializing in Statistics and majoring in Mathematics. Meticulous and soft-hearted, she often finds herself engrossed in new pastimes by the second at the influence of her peers. One of which that has remained a longtime constant - spending an excessive amount of time helping people debug their R code. 315 | - Yena Joo is an undergraduate student majoring in Economics and double minoring in Statistics and Computer Science. 316 | 317 | 318 | ## Pedagogical underpinnings 319 | 320 | *Coming soon.* 321 | 322 | ## Acknowledgements 323 | 324 | 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. 325 | 326 | We'd like to acknowledge the help of: 327 | 328 | - Liza Bolton 329 | - Monica Alexander 330 | - Sabrina Sixta 331 | 332 | We'd like to thank Alex Cookson for his collection of datasets. 333 | 334 | This toolkit builds on, and complements, the work of many others, including: 335 | 336 | - Alex Stringer - https://github.com/awstringer1/course-materials 337 | - Alison Gibbs, Jeff Rosenthal, Nathan Taback - https://stats.onlinelearning.utoronto.ca/ 338 | - Bethany White and Jennifer Peter - https://rscidata.utoronto.ca/ 339 | - Desirée De Leon and Alison Hill - https://rstudio4edu.github.io/rstudio4edu-book/ 340 | - Hasse Walum and Desirée De Leon - https://tinystats.github.io/teacups-giraffes-and-statistics/index.html 341 | - Nathan Taback - https://ntaback.github.io/UofT_STA130/R_resources.html 342 | - Radford Neal - http://www.cs.utoronto.ca/~radford/csc121.S17/ 343 | 344 | Rohan would like to thank Greg Wilson, for sharing his experience, thoughts, and leadership. 345 | 346 | 347 | ## References 348 | 349 | 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. 350 | 351 | - Barret Schloerke, JJ Allaire, Barbara Borges and Garrick Aden-Buie (2021). learnr: Interactive Tutorials for R. https://rstudio.github.io/learnr/, https://github.com/rstudio/learnr. 352 | - Bodwin, Kelly, and Hunter Glanz (2020). flair: Highlight, Annotate, and Format your R Source Code. R package version 0.0.2. https://CRAN.R-project.org/package=flair 353 | - Chen, Daniel, Barret Schloerke, Garrick Aden-Buie and Garrett Grolemund (2021). gradethis: Automated Feedback for Student Exercises in 'learnr' Tutorials. https://rstudio-education.github.io/gradethis/, https://rstudio.github.io/learnr/, https://github.com/rstudio-education/gradethis. 354 | - de Vries, Andrie, Barret Schloerke and Kenton Russell (2020). sortable: Drag-and-Drop in 'shiny' Apps with 'SortableJS'. R package version 0.4.4. https://CRAN.R-project.org/package=sortable 355 | - Gelfand, Sharla, (2020). opendatatoronto: Access the City of Toronto Open Data Portal. R package version 0.1.4. https://CRAN.R-project.org/package=opendatatoronto 356 | - Hester, Jim, Gábor Csárdi, Hadley Wickham, Winston Chang, Martin Morgan and Dan Tenenbaum (2020). remotes: R Package Installation from Remote Repositories, Including 'GitHub'. R package version 2.2.0. https://CRAN.R-project.org/package=remotes 357 | - R Core Team (2020). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/. 358 | - Wickham et al., (2019). Welcome to the tidyverse. Journal of Open Source Software, 4(43), 1686, https://doi.org/10.21105/joss.01686 359 | 360 | 361 | 362 | ## Related packages 363 | 364 | - TBD 365 | 366 | ## Next steps 367 | 368 | - Assessment 369 | - Teaching 370 | - French language version 371 | 372 | 373 | ## Citation 374 | 375 | We have a pre-print coming soon. 376 | 377 | 378 | 379 | 380 | ## How to contribute 381 | 382 | The best way to contribute fixes and minor typos is to make a pull request on GitHub. 383 | 384 | 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. 385 | 386 | 387 | 388 | 389 | ## Contact 390 | 391 | Please contact Rohan (rohan.alexander@utoronto.ca) with any questions, comments, and suggestions. 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ## DoSStoolkit 5 | 6 | The DoSS Toolkit is a bunch of self-paced modules to help you learn and 7 | use R. 8 | 9 | We all know that R is a critical part of applied statistics and data 10 | science these days, but it can have a steep learning curve and be 11 | intimidating to get started with. 12 | 13 | The [Department of Statistical Sciences](http://www.utstat.utoronto.ca/) 14 | (DoSS) toolkit is a free series of open source online modules written by 15 | undergraduates, that their fellow students and the public can use to 16 | learn the essentials of R. 17 | 18 | ## How to use this resource 19 | 20 | ### If you have never used R before 21 | 22 | You use this resource by running R code! This may sound intimidating if 23 | you’ve never used R before, so we’ve made a video that walks through 24 | what you need to do. 25 | 26 | 28 | 29 | Get started by going to R Studio Cloud - - and 30 | creating an account. When you’ve signed up, start a new project, and 31 | copy-paste the code below to install packages. (If you already have R 32 | and R Studio working on your local computer then you don’t have to use R 33 | Studio Cloud, you can install the packages on your local machine 34 | instead.) 35 | 36 | ``` r 37 | install.packages('tidyverse') 38 | install.packages('remotes') 39 | install.packages('opendatatoronto') 40 | remotes::install_github("rstudio-education/gradethis") 41 | ``` 42 | 43 | Then you can install the `DoSStoolkit`: 44 | 45 | ``` r 46 | remotes::install_github("RohanAlexander/DoSStoolkit") 47 | ``` 48 | 49 | You’ll use the function `run_tutorial` to run each module. At the moment 50 | we have nine modules. So you can pick one to start with. For instance, 51 | if you wanted to run the ‘hello world’ module then run: 52 | 53 | ``` r 54 | learnr::run_tutorial("hello_world", package = "DoSStoolkit") 55 | ``` 56 | 57 | ### If you already have R and R Studio on your computer 58 | 59 | You can install `DoSStoolkit` from [GitHub](https://github.com/) with: 60 | 61 | ``` r 62 | # install.packages("devtools") 63 | devtools::install_github("RohanAlexander/heapsofpapers") 64 | 65 | # install.packages('tidyverse') 66 | # install.packages('remotes') 67 | # install.packages('opendatatoronto') 68 | remotes::install_github("rstudio-education/gradethis") 69 | ``` 70 | 71 | Then you can install the `DoSStoolkit`: 72 | 73 | ``` r 74 | remotes::install_github("RohanAlexander/DoSStoolkit") 75 | ``` 76 | 77 | You’ll use the function `run_tutorial` to run each module. At the moment 78 | we have ten modules. So you can pick one to start with. For instance, if 79 | you wanted to run the ‘hello world’ module then run: 80 | 81 | ``` r 82 | learnr::run_tutorial("hello_world", package = "DoSStoolkit") 83 | ``` 84 | 85 | ## Content 86 | 87 | We have ten modules. A complete collection is here: 88 | 89 | ``` r 90 | learnr::run_tutorial("hello_world", package = "DoSStoolkit") 91 | learnr::run_tutorial("operating_in_an_error_prone_world", package = "DoSStoolkit") 92 | learnr::run_tutorial("holding_the_chaos_at_bay", package = "DoSStoolkit") 93 | learnr::run_tutorial("hand_me_my_plyrs", package = "DoSStoolkit") 94 | learnr::run_tutorial("totally_addicted_to_base", package = "DoSStoolkit") 95 | learnr::run_tutorial("he_was_a_d8er_boi", package = "DoSStoolkit") 96 | learnr::run_tutorial("to_ggplot_or_not_to_ggplot", package = "DoSStoolkit") 97 | learnr::run_tutorial("r_marky_markdown", package = "DoSStoolkit") 98 | learnr::run_tutorial("git_outta_here", package = "DoSStoolkit") 99 | learnr::run_tutorial("indistinguishable_from_magic", package = "DoSStoolkit") 100 | ``` 101 | 102 | ### Hello world! 103 | 104 | How to run this module: 105 | 106 | ``` r 107 | learnr::run_tutorial("hello_world", package = "DoSStoolkit") 108 | ``` 109 | 110 | Module content: 111 | 112 | - Why I love R, by Liza Bolton. 113 | - Setting up RStudio, by Annie Collins. 114 | - Getting to know what is what - console, terminal, etc, by Annie 115 | Collins. 116 | - A fun hello world exercise, by Annie Collins. 117 | - Another fun hello world exercise, by Shirley Deng. 118 | - R Weekly newsletter, R Ladies, R meetups, by Annie Collins. 119 | 120 | ### Operating in an error prone world 121 | 122 | How to run this module: 123 | 124 | ``` r 125 | learnr::run_tutorial("operating_in_an_error_prone_world", package = "DoSStoolkit") 126 | ``` 127 | 128 | Module content: 129 | 130 | - Why I love R, by Monica Alexander. 131 | - Getting help is normal, by Michael Chong. 132 | - Using Google and Stack Overflow, by Michael Chong. 133 | - Stack overflow, by Annie Collins. 134 | - How to problem solve when your code doesn’t work, by Michael Chong. 135 | - Making reproducible examples, by Marija Pejcinovska. 136 | - How to make the most of R’s cryptic error messages, by Shirley Deng. 137 | 138 | ### Holding the chaos at bay 139 | 140 | How to run this module: 141 | 142 | ``` r 143 | learnr::run_tutorial("holding_the_chaos_at_bay", package = "DoSStoolkit") 144 | ``` 145 | 146 | Module content: 147 | 148 | - Why I love R, by Samantha-Jo Caetano. 149 | - R projects and `setwd()`, by Isaac Ehrlich. 150 | - Folder set-up, by Isaac Ehrlich. 151 | - Writing comments, by Isaac Ehrlich. 152 | - `install.packages()`, by Haoluan Chen. 153 | - `install_github()`, by Haoluan Chen. 154 | - `library()`, by Mariam Walaa. 155 | - `update.packages()`, by Mariam Walaa. 156 | - `read_csv()`, by Marija Pejcinovska. 157 | - `read_table()`, `read_dta()`, and other data types, by Isaac 158 | Ehrlich. 159 | 160 | ### Hand me my plyrs 161 | 162 | How to run this module: 163 | 164 | ``` r 165 | learnr::run_tutorial("hand_me_my_plyrs", package = "DoSStoolkit") 166 | ``` 167 | 168 | Module content: 169 | 170 | - Why I love R, by Sabrina Sixta. 171 | - What is the tidyverse?, by Yena Joo. 172 | - The pipe, by Mariam Walaa. 173 | - `select()`, by Yena Joo. 174 | - `filter()`, by Shirley Deng. 175 | - `group_by()` and `ungroup()`, by Matthew Wankiewicz. 176 | - `summarise()`, by Mariam Walaa. 177 | - `arrange()`, by Isaac Ehrlich. 178 | - `mutate()`, by Haoluan Chen. 179 | - `pivot_wider()` and `pivot_longer()`, by Annie Collins. 180 | - `rename()`, by Mariam Walaa. 181 | - `count()` and `uncount()`, by Annie Collins. 182 | - `slice()`, by Annie Collins. 183 | - `c()`, `matrix()`, `data.frame()`, and `tibble()`, by Matthew 184 | Wankiewicz. 185 | - `length()`, `nrow()`, and `ncol()`, by Isaac Ehrlich. 186 | 187 | ### Totally addicted to base 188 | 189 | How to run this module: 190 | 191 | ``` r 192 | learnr::run_tutorial("totally_addicted_to_base", package = "DoSStoolkit") 193 | ``` 194 | 195 | Module content: 196 | 197 | - Why I love R, by Rohan Alexander. 198 | - `mean()`, `median()`, `sd()`, `lm()`, and `summary()`, by Mariam 199 | Walaa. 200 | - `function()`, by Haoluan Chen. 201 | - `for()` and `while()`, by Yena Joo. 202 | - `if()`, `if_else()` and `case_when()`, by Haoluan Chen. 203 | - `c()`, `seq()`, `seq_along()`, and `rep()`, by Matthew Wankiewicz. 204 | - `hist()`, `plot()`, and `boxplot()`, by Yena Joo. 205 | 206 | ### He was a d8er boi 207 | 208 | How to run this module: 209 | 210 | ``` r 211 | learnr::run_tutorial("he_was_a_d8er_boi", package = "DoSStoolkit") 212 | ``` 213 | 214 | Module content: 215 | 216 | - `head()`, `tail()`, `glimpse()`, and `summary()`, written by Haoluan 217 | Chen. 218 | - `paste()`, `paste0()`, `glue::glue()` and `stringr`, written by 219 | Marija Pejcinovska 220 | - `names()`, `rbind()` and `cbind()`, written by Isaac Ehrlich. 221 | - `left_join()`, `anti_join()`, `full_join()`, etc, written by Haoluan 222 | Chen. 223 | - Looking for missing data, written by Mariam Walaa. 224 | - `set.seed()`, `runif()`, `rnorm()`, and `sample()`, written by 225 | Haoluan Chen. 226 | - Simulating datasets for regression, written by Mariam Walaa. 227 | - Advanced mutating and summarising, written by Mariam Walaa. 228 | - Tidying up datasets, written by Mariam Walaa. 229 | - `pull()`, `pluck()`, and `unnest()`, by Isaac Ehrlich. 230 | - `forcats` and factors, written by Matthew Wankiewicz. 231 | - More on strings, written by Annie Collins. 232 | - Regular expressions, written by Shirley Deng. 233 | - Working with dates, written by Mariam Walaa. 234 | - `janitor`, written by Mariam Walaa. 235 | - `tidyr`, written by Mariam Walaa. 236 | 237 | ### To ggplot or not to ggplot 238 | 239 | How to run this module: 240 | 241 | ``` r 242 | learnr::run_tutorial("to_ggplot_or_not_to_ggplot", package = "DoSStoolkit") 243 | ``` 244 | 245 | Module content: 246 | 247 | - `ggplot2::ggplot()`, by Shirley Deng. 248 | - Bar charts, by Matthew Wankiewicz. 249 | - Histograms, by Haoluan Chen. 250 | - Scatter plots, by Haoluan Chen. 251 | - Various useful options, by Yena Joo. 252 | - Saving graphs, by Yena Joo. 253 | 254 | ### R Marky Markdown and the Funky Docs 255 | 256 | How to run this module: 257 | 258 | ``` r 259 | learnr::run_tutorial("r_marky_markdown", package = "DoSStoolkit") 260 | ``` 261 | 262 | Module content: 263 | 264 | - Introduction to R Markdown, written by Shirley Deng. 265 | - Top Matter: Title, Date, Author, Abstract, written by Yena Joo. 266 | - Tables: `kable`, `kableextra`, `gt`, written by Yena Joo. 267 | - Multiple plots with `patchwork`, written by Michael Chong 268 | - References and Bibtex, written by Yena Joo. 269 | - PDF outputs, written by Yena Joo. 270 | - `here::here()` and filepaths, written by Matthew Wankiewicz. 271 | 272 | ### Git outta here 273 | 274 | How to run this module: 275 | 276 | ``` r 277 | learnr::run_tutorial("git_outta_here", package = "DoSStoolkit") 278 | ``` 279 | 280 | Module content: 281 | 282 | - What is version control and GitHub?, written by Mariam Walaa. 283 | - Git: pull, status, add, commit, push, written by Mariam Walaa. 284 | - Branches in GitHub, written by Matthew Wankiewicz. 285 | - Dealing with Conflicts, written by Matthew Wankiewicz. 286 | - Putting (G)it All together in RStudio, written by Matthew 287 | Wankiewicz. 288 | 289 | ### Indistinguishable from magic 290 | 291 | How to run this module: 292 | 293 | ``` r 294 | learnr::run_tutorial("indistinguishable_from_magic", package = "DoSStoolkit") 295 | ``` 296 | 297 | Module content: 298 | 299 | - Coding style, written by Marija Pejcinovska. 300 | - Static maps with `ggmap`, by Annie Collins. 301 | - Writing R Packages, written by Matthew Wankiewicz. 302 | - Getting started with Blogdown, written by Annie Collins. 303 | - Getting started with Shiny, written by Matthew Wankiewicz. 304 | 305 | ## Contributors 306 | 307 | - Annie Collins is an undergraduate student in the Department of 308 | Mathematics specializing in applied mathematics and statistics with 309 | a minor in history and philosophy of science. In her free time, she 310 | focuses her efforts on student governance, promoting women’s 311 | representation in STEM, and working with data in the non-profit and 312 | charitable sector. 313 | - Haoluan Chen is an undergraduate student in the Department of 314 | Statistical Science specializing in applied statistics. He is 315 | interested in applying data science techniques, especially in NLP, 316 | to gain insight from the data. 317 | - Isaac Ehrlich is an undergraduate student in Statistics and 318 | Cognitive Science at the University of Toronto. He enjoys using R 319 | for everything from analysing trends in his recent movie-viewing 320 | history, to his past research building models on human 321 | categorization. 322 | - Mariam Walaa is an undergraduate student in the Department of 323 | Computer and Mathematical Sciences at University of Toronto 324 | Scarborough, majoring in Mathematics and minoring in GIS and 325 | statistics. Mariam enjoys learning about how to work with data such 326 | as spatial and text data to extract insights. 327 | - Marija Pejcinovska is a graduate student in the Department of 328 | Statistical Sciences. Her research is motivated by modelling 329 | challenges that arise with “complicated” data (sparse/highly 330 | biased/poor quality data), usually in the context of social or 331 | health inequalities. 332 | - Matthew Wankiewicz is an undergraduate student at the University of 333 | Toronto, majoring in Statistics and minoring in Mathematics and the 334 | History and Philosophy of Science. 335 | - Michael Chong is a graduate student in the Department of Statistical 336 | Sciences. His research aims to build statistical models for 337 | demographic estimation in contexts where high quality data are 338 | unavailable. There is almost always an active R session on his 339 | computer! 340 | - Paul Hodgetts is a Master of Information candidate concentrating in 341 | Human-Centred Data Science in the Faculty of Information, University 342 | of Toronto. He sincerely believes that Calvin and Hobbes is the 343 | greatest comic ever produced. 344 | - Rohan Alexander is an assistant professor in the Faculty of 345 | Information and the Department of Statistical Sciences. Some people 346 | convert to catholicism upon marriage, Rohan converted to R. His 347 | greatest professional achievement is probably getting a pull request 348 | accepted into R for Data Science (it was just fixing a minor typo 349 | but still). 350 | - Samantha-Jo Caetano is an assistant professor (teaching stream) in 351 | the Department of Statistical Sciences. She loves statistics, 352 | socializing, her family, and her dogs, not necessarily in that 353 | order. 354 | - Shirley Deng is an undergraduate student specializing in Statistics 355 | and majoring in Mathematics. Meticulous and soft-hearted, she often 356 | finds herself engrossed in new pastimes by the second at the 357 | influence of her peers. One of which that has remained a longtime 358 | constant - spending an excessive amount of time helping people debug 359 | their R code. 360 | - Yena Joo is an undergraduate student majoring in Economics and 361 | double minoring in Statistics and Computer Science. 362 | 363 | ## Pedagogical underpinnings 364 | 365 | *Coming soon.* 366 | 367 | ## Acknowledgements 368 | 369 | We gratefully acknowledge the support of Professor Bethany White, Chair 370 | Radu Craiu, and the U of T Faculty of Arts & Sciences Pedagogical 371 | Innovation and Experimentation Fund. 372 | 373 | We’d like to acknowledge the help of: 374 | 375 | - Liza Bolton 376 | - Monica Alexander 377 | - Sabrina Sixta 378 | 379 | We’d like to thank Alex Cookson for his collection of datasets. 380 | 381 | This toolkit builds on, and complements, the work of many others, 382 | including: 383 | 384 | - Alex Stringer - 385 | - Alison Gibbs, Jeff Rosenthal, Nathan Taback - 386 | 387 | - Bethany White and Jennifer Peter - 388 | - Desirée De Leon and Alison Hill - 389 | 390 | - Hasse Walum and Desirée De Leon - 391 | 392 | - Nathan Taback - 393 | 394 | - Radford Neal - 395 | 396 | Rohan would like to thank Greg Wilson, for sharing his experience, 397 | thoughts, and leadership. 398 | 399 | ## References 400 | 401 | We draw on the open-source statistical programming language R and a 402 | variety of packages. We are grateful for the work that we build on. 403 | 404 | - Barret Schloerke, JJ Allaire, Barbara Borges and Garrick Aden-Buie 405 | (2021). learnr: Interactive Tutorials for R. 406 | , 407 | . 408 | - Bodwin, Kelly, and Hunter Glanz (2020). flair: Highlight, Annotate, 409 | and Format your R Source Code. R package version 0.0.2. 410 | 411 | - Chen, Daniel, Barret Schloerke, Garrick Aden-Buie and Garrett 412 | Grolemund (2021). gradethis: Automated Feedback for Student 413 | Exercises in ‘learnr’ Tutorials. 414 | , 415 | , 416 | . 417 | - de Vries, Andrie, Barret Schloerke and Kenton Russell (2020). 418 | sortable: Drag-and-Drop in ‘shiny’ Apps with ‘SortableJS’. R package 419 | version 0.4.4. 420 | - Gelfand, Sharla, (2020). opendatatoronto: Access the City of Toronto 421 | Open Data Portal. R package version 0.1.4. 422 | 423 | - Hester, Jim, Gábor Csárdi, Hadley Wickham, Winston Chang, Martin 424 | Morgan and Dan Tenenbaum (2020). remotes: R Package Installation 425 | from Remote Repositories, Including ‘GitHub’. R package version 426 | 2.2.0. 427 | - R Core Team (2020). R: A language and environment for statistical 428 | computing. R Foundation for Statistical Computing, Vienna, Austria. 429 | URL . 430 | - Wickham et al., (2019). Welcome to the tidyverse. Journal of Open 431 | Source Software, 4(43), 1686, 432 | 433 | ## Related packages 434 | 435 | - TBD 436 | 437 | ## Next steps 438 | 439 | - Assessment 440 | - Teaching 441 | - French language version 442 | 443 | ## Citation 444 | 445 | We have a pre-print coming soon. 446 | 447 | ## How to contribute 448 | 449 | The best way to contribute fixes and minor typos is to make a pull 450 | request on GitHub. 451 | 452 | If you are interested in contributing lessons or modules, then please 453 | contact Rohan Alexander. We are particularly interested in partnering 454 | with an institution where the language of instruction is French to 455 | develop a French language version. 456 | 457 | ## Contact 458 | 459 | Please contact Rohan () with any questions, 460 | comments, and suggestions. 461 | -------------------------------------------------------------------------------- /_pkgdown.yml: -------------------------------------------------------------------------------- 1 | template: 2 | params: 3 | bootswatch: flatly 4 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/docs/.nojekyll -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Page not found (404) • DoSStoolkit 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 |
63 | 102 | 103 | 104 | 105 |
106 | 107 |
108 |
109 | 112 | 113 | Content not found. Please use links in the navbar. 114 | 115 |
116 | 117 | 122 | 123 |
124 | 125 | 126 | 127 |
128 | 131 | 132 |
133 |

Site built with pkgdown 1.6.1.

134 |
135 | 136 |
137 |
138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | dosstoolkit.com -------------------------------------------------------------------------------- /docs/LICENSE-text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | License • DoSStoolkit 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 |
63 | 102 | 103 | 104 | 105 |
106 | 107 |
108 |
109 | 112 | 113 |
YEAR: 2021
114 | COPYRIGHT HOLDER: Rohan Alexander
115 | 
116 | 117 |
118 | 119 | 124 | 125 |
126 | 127 | 128 | 129 |
130 | 133 | 134 |
135 |

Site built with pkgdown 1.6.1.

136 |
137 | 138 |
139 |
140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /docs/LICENSE.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | MIT License • DoSStoolkit 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 |
63 | 102 | 103 | 104 | 105 |
106 | 107 |
108 |
109 | 112 | 113 |
114 | 115 |

Copyright (c) 2021 Rohan Alexander

116 |

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

117 |

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

118 |

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

119 |
120 | 121 |
122 | 123 | 128 | 129 |
130 | 131 | 132 | 133 |
134 | 137 | 138 |
139 |

Site built with pkgdown 1.6.1.

140 |
141 | 142 |
143 |
144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /docs/authors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Authors • DoSStoolkit 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 |
63 | 102 | 103 | 104 | 105 |
106 | 107 |
108 |
109 | 112 | 113 |
    114 |
  • 115 |

    Rohan Alexander. Author, maintainer. 116 |

    117 |
  • 118 |
  • 119 |

    Samantha-Jo Caetano. Author. 120 |

    121 |
  • 122 |
  • 123 |

    Annie Collins. Author. 124 |

    125 |
  • 126 |
  • 127 |

    Haoluan Chen. Author. 128 |

    129 |
  • 130 |
  • 131 |

    Isaac Ehrlich. Author. 132 |

    133 |
  • 134 |
  • 135 |

    Mariam Walaa. Author. 136 |

    137 |
  • 138 |
  • 139 |

    Marija Pejcinovska. Author. 140 |

    141 |
  • 142 |
  • 143 |

    Matthew Wankiewicz. Author. 144 |

    145 |
  • 146 |
  • 147 |

    Michael Chong. Author. 148 |

    149 |
  • 150 |
  • 151 |

    Paul Hodgetts. Author. 152 |

    153 |
  • 154 |
  • 155 |

    Shirley Deng. Author. 156 |

    157 |
  • 158 |
  • 159 |

    Yena Joo. Author. 160 |

    161 |
  • 162 |
163 | 164 |
165 | 166 |
167 | 168 | 169 | 170 |
171 | 174 | 175 |
176 |

Site built with pkgdown 1.6.1.

177 |
178 | 179 |
180 |
181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /docs/bootstrap-toc.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | 6 | /* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ 7 | 8 | /* All levels of nav */ 9 | nav[data-toggle='toc'] .nav > li > a { 10 | display: block; 11 | padding: 4px 20px; 12 | font-size: 13px; 13 | font-weight: 500; 14 | color: #767676; 15 | } 16 | nav[data-toggle='toc'] .nav > li > a:hover, 17 | nav[data-toggle='toc'] .nav > li > a:focus { 18 | padding-left: 19px; 19 | color: #563d7c; 20 | text-decoration: none; 21 | background-color: transparent; 22 | border-left: 1px solid #563d7c; 23 | } 24 | nav[data-toggle='toc'] .nav > .active > a, 25 | nav[data-toggle='toc'] .nav > .active:hover > a, 26 | nav[data-toggle='toc'] .nav > .active:focus > a { 27 | padding-left: 18px; 28 | font-weight: bold; 29 | color: #563d7c; 30 | background-color: transparent; 31 | border-left: 2px solid #563d7c; 32 | } 33 | 34 | /* Nav: second level (shown on .active) */ 35 | nav[data-toggle='toc'] .nav .nav { 36 | display: none; /* Hide by default, but at >768px, show it */ 37 | padding-bottom: 10px; 38 | } 39 | nav[data-toggle='toc'] .nav .nav > li > a { 40 | padding-top: 1px; 41 | padding-bottom: 1px; 42 | padding-left: 30px; 43 | font-size: 12px; 44 | font-weight: normal; 45 | } 46 | nav[data-toggle='toc'] .nav .nav > li > a:hover, 47 | nav[data-toggle='toc'] .nav .nav > li > a:focus { 48 | padding-left: 29px; 49 | } 50 | nav[data-toggle='toc'] .nav .nav > .active > a, 51 | nav[data-toggle='toc'] .nav .nav > .active:hover > a, 52 | nav[data-toggle='toc'] .nav .nav > .active:focus > a { 53 | padding-left: 28px; 54 | font-weight: 500; 55 | } 56 | 57 | /* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ 58 | nav[data-toggle='toc'] .nav > .active > ul { 59 | display: block; 60 | } 61 | -------------------------------------------------------------------------------- /docs/bootstrap-toc.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | (function() { 6 | 'use strict'; 7 | 8 | window.Toc = { 9 | helpers: { 10 | // return all matching elements in the set, or their descendants 11 | findOrFilter: function($el, selector) { 12 | // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ 13 | // http://stackoverflow.com/a/12731439/358804 14 | var $descendants = $el.find(selector); 15 | return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); 16 | }, 17 | 18 | generateUniqueIdBase: function(el) { 19 | var text = $(el).text(); 20 | var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); 21 | return anchor || el.tagName.toLowerCase(); 22 | }, 23 | 24 | generateUniqueId: function(el) { 25 | var anchorBase = this.generateUniqueIdBase(el); 26 | for (var i = 0; ; i++) { 27 | var anchor = anchorBase; 28 | if (i > 0) { 29 | // add suffix 30 | anchor += '-' + i; 31 | } 32 | // check if ID already exists 33 | if (!document.getElementById(anchor)) { 34 | return anchor; 35 | } 36 | } 37 | }, 38 | 39 | generateAnchor: function(el) { 40 | if (el.id) { 41 | return el.id; 42 | } else { 43 | var anchor = this.generateUniqueId(el); 44 | el.id = anchor; 45 | return anchor; 46 | } 47 | }, 48 | 49 | createNavList: function() { 50 | return $(''); 51 | }, 52 | 53 | createChildNavList: function($parent) { 54 | var $childList = this.createNavList(); 55 | $parent.append($childList); 56 | return $childList; 57 | }, 58 | 59 | generateNavEl: function(anchor, text) { 60 | var $a = $(''); 61 | $a.attr('href', '#' + anchor); 62 | $a.text(text); 63 | var $li = $('
  • '); 64 | $li.append($a); 65 | return $li; 66 | }, 67 | 68 | generateNavItem: function(headingEl) { 69 | var anchor = this.generateAnchor(headingEl); 70 | var $heading = $(headingEl); 71 | var text = $heading.data('toc-text') || $heading.text(); 72 | return this.generateNavEl(anchor, text); 73 | }, 74 | 75 | // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). 76 | getTopLevel: function($scope) { 77 | for (var i = 1; i <= 6; i++) { 78 | var $headings = this.findOrFilter($scope, 'h' + i); 79 | if ($headings.length > 1) { 80 | return i; 81 | } 82 | } 83 | 84 | return 1; 85 | }, 86 | 87 | // returns the elements for the top level, and the next below it 88 | getHeadings: function($scope, topLevel) { 89 | var topSelector = 'h' + topLevel; 90 | 91 | var secondaryLevel = topLevel + 1; 92 | var secondarySelector = 'h' + secondaryLevel; 93 | 94 | return this.findOrFilter($scope, topSelector + ',' + secondarySelector); 95 | }, 96 | 97 | getNavLevel: function(el) { 98 | return parseInt(el.tagName.charAt(1), 10); 99 | }, 100 | 101 | populateNav: function($topContext, topLevel, $headings) { 102 | var $context = $topContext; 103 | var $prevNav; 104 | 105 | var helpers = this; 106 | $headings.each(function(i, el) { 107 | var $newNav = helpers.generateNavItem(el); 108 | var navLevel = helpers.getNavLevel(el); 109 | 110 | // determine the proper $context 111 | if (navLevel === topLevel) { 112 | // use top level 113 | $context = $topContext; 114 | } else if ($prevNav && $context === $topContext) { 115 | // create a new level of the tree and switch to it 116 | $context = helpers.createChildNavList($prevNav); 117 | } // else use the current $context 118 | 119 | $context.append($newNav); 120 | 121 | $prevNav = $newNav; 122 | }); 123 | }, 124 | 125 | parseOps: function(arg) { 126 | var opts; 127 | if (arg.jquery) { 128 | opts = { 129 | $nav: arg 130 | }; 131 | } else { 132 | opts = arg; 133 | } 134 | opts.$scope = opts.$scope || $(document.body); 135 | return opts; 136 | } 137 | }, 138 | 139 | // accepts a jQuery object, or an options object 140 | init: function(opts) { 141 | opts = this.helpers.parseOps(opts); 142 | 143 | // ensure that the data attribute is in place for styling 144 | opts.$nav.attr('data-toggle', 'toc'); 145 | 146 | var $topContext = this.helpers.createChildNavList(opts.$nav); 147 | var topLevel = this.helpers.getTopLevel(opts.$scope); 148 | var $headings = this.helpers.getHeadings(opts.$scope, topLevel); 149 | this.helpers.populateNav($topContext, topLevel, $headings); 150 | } 151 | }; 152 | 153 | $(function() { 154 | $('nav[data-toggle="toc"]').each(function(i, el) { 155 | var $nav = $(el); 156 | Toc.init($nav); 157 | }); 158 | }); 159 | })(); 160 | -------------------------------------------------------------------------------- /docs/docsearch.css: -------------------------------------------------------------------------------- 1 | /* Docsearch -------------------------------------------------------------- */ 2 | /* 3 | Source: https://github.com/algolia/docsearch/ 4 | License: MIT 5 | */ 6 | 7 | .algolia-autocomplete { 8 | display: block; 9 | -webkit-box-flex: 1; 10 | -ms-flex: 1; 11 | flex: 1 12 | } 13 | 14 | .algolia-autocomplete .ds-dropdown-menu { 15 | width: 100%; 16 | min-width: none; 17 | max-width: none; 18 | padding: .75rem 0; 19 | background-color: #fff; 20 | background-clip: padding-box; 21 | border: 1px solid rgba(0, 0, 0, .1); 22 | box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); 23 | } 24 | 25 | @media (min-width:768px) { 26 | .algolia-autocomplete .ds-dropdown-menu { 27 | width: 175% 28 | } 29 | } 30 | 31 | .algolia-autocomplete .ds-dropdown-menu::before { 32 | display: none 33 | } 34 | 35 | .algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { 36 | padding: 0; 37 | background-color: rgb(255,255,255); 38 | border: 0; 39 | max-height: 80vh; 40 | } 41 | 42 | .algolia-autocomplete .ds-dropdown-menu .ds-suggestions { 43 | margin-top: 0 44 | } 45 | 46 | .algolia-autocomplete .algolia-docsearch-suggestion { 47 | padding: 0; 48 | overflow: visible 49 | } 50 | 51 | .algolia-autocomplete .algolia-docsearch-suggestion--category-header { 52 | padding: .125rem 1rem; 53 | margin-top: 0; 54 | font-size: 1.3em; 55 | font-weight: 500; 56 | color: #00008B; 57 | border-bottom: 0 58 | } 59 | 60 | .algolia-autocomplete .algolia-docsearch-suggestion--wrapper { 61 | float: none; 62 | padding-top: 0 63 | } 64 | 65 | .algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { 66 | float: none; 67 | width: auto; 68 | padding: 0; 69 | text-align: left 70 | } 71 | 72 | .algolia-autocomplete .algolia-docsearch-suggestion--content { 73 | float: none; 74 | width: auto; 75 | padding: 0 76 | } 77 | 78 | .algolia-autocomplete .algolia-docsearch-suggestion--content::before { 79 | display: none 80 | } 81 | 82 | .algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { 83 | padding-top: .75rem; 84 | margin-top: .75rem; 85 | border-top: 1px solid rgba(0, 0, 0, .1) 86 | } 87 | 88 | .algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { 89 | display: block; 90 | padding: .1rem 1rem; 91 | margin-bottom: 0.1; 92 | font-size: 1.0em; 93 | font-weight: 400 94 | /* display: none */ 95 | } 96 | 97 | .algolia-autocomplete .algolia-docsearch-suggestion--title { 98 | display: block; 99 | padding: .25rem 1rem; 100 | margin-bottom: 0; 101 | font-size: 0.9em; 102 | font-weight: 400 103 | } 104 | 105 | .algolia-autocomplete .algolia-docsearch-suggestion--text { 106 | padding: 0 1rem .5rem; 107 | margin-top: -.25rem; 108 | font-size: 0.8em; 109 | font-weight: 400; 110 | line-height: 1.25 111 | } 112 | 113 | .algolia-autocomplete .algolia-docsearch-footer { 114 | width: 110px; 115 | height: 20px; 116 | z-index: 3; 117 | margin-top: 10.66667px; 118 | float: right; 119 | font-size: 0; 120 | line-height: 0; 121 | } 122 | 123 | .algolia-autocomplete .algolia-docsearch-footer--logo { 124 | background-image: url("data:image/svg+xml;utf8,"); 125 | background-repeat: no-repeat; 126 | background-position: 50%; 127 | background-size: 100%; 128 | overflow: hidden; 129 | text-indent: -9000px; 130 | width: 100%; 131 | height: 100%; 132 | display: block; 133 | transform: translate(-8px); 134 | } 135 | 136 | .algolia-autocomplete .algolia-docsearch-suggestion--highlight { 137 | color: #FF8C00; 138 | background: rgba(232, 189, 54, 0.1) 139 | } 140 | 141 | 142 | .algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { 143 | box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) 144 | } 145 | 146 | .algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { 147 | background-color: rgba(192, 192, 192, .15) 148 | } 149 | -------------------------------------------------------------------------------- /docs/docsearch.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // register a handler to move the focus to the search bar 4 | // upon pressing shift + "/" (i.e. "?") 5 | $(document).on('keydown', function(e) { 6 | if (e.shiftKey && e.keyCode == 191) { 7 | e.preventDefault(); 8 | $("#search-input").focus(); 9 | } 10 | }); 11 | 12 | $(document).ready(function() { 13 | // do keyword highlighting 14 | /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ 15 | var mark = function() { 16 | 17 | var referrer = document.URL ; 18 | var paramKey = "q" ; 19 | 20 | if (referrer.indexOf("?") !== -1) { 21 | var qs = referrer.substr(referrer.indexOf('?') + 1); 22 | var qs_noanchor = qs.split('#')[0]; 23 | var qsa = qs_noanchor.split('&'); 24 | var keyword = ""; 25 | 26 | for (var i = 0; i < qsa.length; i++) { 27 | var currentParam = qsa[i].split('='); 28 | 29 | if (currentParam.length !== 2) { 30 | continue; 31 | } 32 | 33 | if (currentParam[0] == paramKey) { 34 | keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); 35 | } 36 | } 37 | 38 | if (keyword !== "") { 39 | $(".contents").unmark({ 40 | done: function() { 41 | $(".contents").mark(keyword); 42 | } 43 | }); 44 | } 45 | } 46 | }; 47 | 48 | mark(); 49 | }); 50 | }); 51 | 52 | /* Search term highlighting ------------------------------*/ 53 | 54 | function matchedWords(hit) { 55 | var words = []; 56 | 57 | var hierarchy = hit._highlightResult.hierarchy; 58 | // loop to fetch from lvl0, lvl1, etc. 59 | for (var idx in hierarchy) { 60 | words = words.concat(hierarchy[idx].matchedWords); 61 | } 62 | 63 | var content = hit._highlightResult.content; 64 | if (content) { 65 | words = words.concat(content.matchedWords); 66 | } 67 | 68 | // return unique words 69 | var words_uniq = [...new Set(words)]; 70 | return words_uniq; 71 | } 72 | 73 | function updateHitURL(hit) { 74 | 75 | var words = matchedWords(hit); 76 | var url = ""; 77 | 78 | if (hit.anchor) { 79 | url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; 80 | } else { 81 | url = hit.url + '?q=' + escape(words.join(" ")); 82 | } 83 | 84 | return url; 85 | } 86 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Self-Paced Modules to Help You Learn R • DoSStoolkit 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 |
    23 |
    63 | 64 | 65 | 66 | 67 |
    68 |
    69 | 70 |
    71 |

    72 | DoSStoolkit 73 |

    74 |

    The DoSS Toolkit is a bunch of self-paced modules to help you learn and use R.

    75 |

    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.

    76 |

    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.

    77 |
    78 |
    79 |

    80 | How to use this resource

    81 |
    82 |

    83 | If you have never used R before

    84 |

    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.

    85 | 87 |

    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.)

    88 |
     89 | install.packages('tidyverse')
     90 | install.packages('remotes')
     91 | install.packages('opendatatoronto')
     92 | remotes::install_github("rstudio-education/gradethis")
    93 |

    Then you can install the DoSStoolkit:

    94 |
     95 | remotes::install_github("RohanAlexander/DoSStoolkit")
    96 |

    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:

    97 |
     98 | learnr::run_tutorial("hello_world", package = "DoSStoolkit")
    99 |
    100 |
    101 |

    102 | If you already have R and R Studio on your computer

    103 |

    You can install DoSStoolkit from GitHub with:

    104 |
    105 | # install.packages("devtools")
    106 | devtools::install_github("RohanAlexander/heapsofpapers")
    107 | 
    108 | # install.packages('tidyverse')
    109 | # install.packages('remotes')
    110 | # install.packages('opendatatoronto')
    111 | remotes::install_github("rstudio-education/gradethis")
    112 |

    Then you can install the DoSStoolkit:

    113 |
    114 | remotes::install_github("RohanAlexander/DoSStoolkit")
    115 |

    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:

    116 |
    117 | learnr::run_tutorial("hello_world", package = "DoSStoolkit")
    118 |
    119 |
    120 |
    121 |

    122 | Content

    123 |

    We have ten modules. A complete collection is here:

    124 |
    125 | learnr::run_tutorial("hello_world", package = "DoSStoolkit")
    126 | learnr::run_tutorial("operating_in_an_error_prone_world", package = "DoSStoolkit")
    127 | learnr::run_tutorial("holding_the_chaos_at_bay", package = "DoSStoolkit")
    128 | learnr::run_tutorial("hand_me_my_plyrs", package = "DoSStoolkit")
    129 | learnr::run_tutorial("totally_addicted_to_base", package = "DoSStoolkit")
    130 | learnr::run_tutorial("he_was_a_d8er_boi", package = "DoSStoolkit")
    131 | learnr::run_tutorial("to_ggplot_or_not_to_ggplot", package = "DoSStoolkit")
    132 | learnr::run_tutorial("r_marky_markdown", package = "DoSStoolkit")
    133 | learnr::run_tutorial("git_outta_here", package = "DoSStoolkit")
    134 | learnr::run_tutorial("indistinguishable_from_magic", package = "DoSStoolkit")
    135 |
    136 |

    137 | Hello world!

    138 |

    How to run this module:

    139 |
    140 | learnr::run_tutorial("hello_world", package = "DoSStoolkit")
    141 |

    Module content:

    142 |
      143 |
    • Why I love R, by Liza Bolton.
    • 144 |
    • Setting up RStudio, by Annie Collins.
    • 145 |
    • Getting to know what is what - console, terminal, etc, by Annie Collins.
    • 146 |
    • A fun hello world exercise, by Annie Collins.
    • 147 |
    • Another fun hello world exercise, by Shirley Deng.
    • 148 |
    • R Weekly newsletter, R Ladies, R meetups, by Annie Collins.
    • 149 |
    150 |
    151 |
    152 |

    153 | Operating in an error prone world

    154 |

    How to run this module:

    155 |
    156 | learnr::run_tutorial("operating_in_an_error_prone_world", package = "DoSStoolkit")
    157 |

    Module content:

    158 |
      159 |
    • Why I love R, by Monica Alexander.
    • 160 |
    • Getting help is normal, by Michael Chong.
    • 161 |
    • Using Google and Stack Overflow, by Michael Chong.
    • 162 |
    • Stack overflow, by Annie Collins.
    • 163 |
    • How to problem solve when your code doesn’t work, by Michael Chong.
    • 164 |
    • Making reproducible examples, by Marija Pejcinovska.
    • 165 |
    • How to make the most of R’s cryptic error messages, by Shirley Deng.
    • 166 |
    167 |
    168 |
    169 |

    170 | Holding the chaos at bay

    171 |

    How to run this module:

    172 |
    173 | learnr::run_tutorial("holding_the_chaos_at_bay", package = "DoSStoolkit")
    174 |

    Module content:

    175 |
      176 |
    • Why I love R, by Samantha-Jo Caetano.
    • 177 |
    • R projects and setwd(), by Isaac Ehrlich.
    • 178 |
    • Folder set-up, by Isaac Ehrlich.
    • 179 |
    • Writing comments, by Isaac Ehrlich.
    • 180 |
    • 181 | install.packages(), by Haoluan Chen.
    • 182 |
    • 183 | install_github(), by Haoluan Chen.
    • 184 |
    • 185 | library(), by Mariam Walaa.
    • 186 |
    • 187 | update.packages(), by Mariam Walaa.
    • 188 |
    • 189 | read_csv(), by Marija Pejcinovska.
    • 190 |
    • 191 | read_table(), read_dta(), and other data types, by Isaac Ehrlich.
    • 192 |
    193 |
    194 |
    195 |

    196 | Hand me my plyrs

    197 |

    How to run this module:

    198 |
    199 | learnr::run_tutorial("hand_me_my_plyrs", package = "DoSStoolkit")
    200 |

    Module content:

    201 |
      202 |
    • Why I love R, by Sabrina Sixta.
    • 203 |
    • What is the tidyverse?, by Yena Joo.
    • 204 |
    • The pipe, by Mariam Walaa.
    • 205 |
    • 206 | select(), by Yena Joo.
    • 207 |
    • 208 | filter(), by Shirley Deng.
    • 209 |
    • 210 | group_by() and ungroup(), by Matthew Wankiewicz.
    • 211 |
    • 212 | summarise(), by Mariam Walaa.
    • 213 |
    • 214 | arrange(), by Isaac Ehrlich.
    • 215 |
    • 216 | mutate(), by Haoluan Chen.
    • 217 |
    • 218 | pivot_wider() and pivot_longer(), by Annie Collins.
    • 219 |
    • 220 | rename(), by Mariam Walaa.
    • 221 |
    • 222 | count() and uncount(), by Annie Collins.
    • 223 |
    • 224 | slice(), by Annie Collins.
    • 225 |
    • 226 | c(), matrix(), data.frame(), and tibble(), by Matthew Wankiewicz.
    • 227 |
    • 228 | length(), nrow(), and ncol(), by Isaac Ehrlich.
    • 229 |
    230 |
    231 |
    232 |

    233 | Totally addicted to base

    234 |

    How to run this module:

    235 |
    236 | learnr::run_tutorial("totally_addicted_to_base", package = "DoSStoolkit")
    237 |

    Module content:

    238 |
      239 |
    • Why I love R, by Rohan Alexander.
    • 240 |
    • 241 | mean(), median(), sd(), lm(), and summary(), by Mariam Walaa.
    • 242 |
    • 243 | function(), by Haoluan Chen.
    • 244 |
    • 245 | for() and while(), by Yena Joo.
    • 246 |
    • 247 | if(), if_else() and case_when(), by Haoluan Chen.
    • 248 |
    • 249 | c(), seq(), seq_along(), and rep(), by Matthew Wankiewicz.
    • 250 |
    • 251 | hist(), plot(), and boxplot(), by Yena Joo.
    • 252 |
    253 |
    254 |
    255 |

    256 | He was a d8er boi

    257 |

    How to run this module:

    258 |
    259 | learnr::run_tutorial("he_was_a_d8er_boi", package = "DoSStoolkit")
    260 |

    Module content:

    261 |
      262 |
    • 263 | head(), tail(), glimpse(), and summary(), written by Haoluan Chen.
    • 264 |
    • 265 | paste(), paste0(), glue::glue() and stringr, written by Marija Pejcinovska
    • 266 |
    • 267 | names(), rbind() and cbind(), written by Isaac Ehrlich.
    • 268 |
    • 269 | left_join(), anti_join(), full_join(), etc, written by Haoluan Chen.
    • 270 |
    • Looking for missing data, written by Mariam Walaa.
    • 271 |
    • 272 | set.seed(), runif(), rnorm(), and sample(), written by Haoluan Chen.
    • 273 |
    • Simulating datasets for regression, written by Mariam Walaa.
    • 274 |
    • Advanced mutating and summarising, written by Mariam Walaa.
    • 275 |
    • Tidying up datasets, written by Mariam Walaa.
    • 276 |
    • 277 | pull(), pluck(), and unnest(), by Isaac Ehrlich.
    • 278 |
    • 279 | forcats and factors, written by Matthew Wankiewicz.
    • 280 |
    • More on strings, written by Annie Collins.
    • 281 |
    • Regular expressions, written by Shirley Deng.
    • 282 |
    • Working with dates, written by Mariam Walaa.
    • 283 |
    • 284 | janitor, written by Mariam Walaa.
    • 285 |
    • 286 | tidyr, written by Mariam Walaa.
    • 287 |
    288 |
    289 |
    290 |

    291 | To ggplot or not to ggplot

    292 |

    How to run this module:

    293 |
    294 | learnr::run_tutorial("to_ggplot_or_not_to_ggplot", package = "DoSStoolkit")
    295 |

    Module content:

    296 |
      297 |
    • 298 | ggplot2::ggplot(), by Shirley Deng.
    • 299 |
    • Bar charts, by Matthew Wankiewicz.
    • 300 |
    • Histograms, by Haoluan Chen.
    • 301 |
    • Scatter plots, by Haoluan Chen.
    • 302 |
    • Various useful options, by Yena Joo.
    • 303 |
    • Saving graphs, by Yena Joo.
    • 304 |
    305 |
    306 |
    307 |

    308 | R Marky Markdown and the Funky Docs

    309 |

    How to run this module:

    310 |
    311 | learnr::run_tutorial("r_marky_markdown", package = "DoSStoolkit")
    312 |

    Module content:

    313 |
      314 |
    • Introduction to R Markdown, written by Shirley Deng.
    • 315 |
    • Top Matter: Title, Date, Author, Abstract, written by Yena Joo.
    • 316 |
    • Tables: kable, kableextra, gt, written by Yena Joo.
    • 317 |
    • Multiple plots with patchwork, written by Michael Chong
    • 318 |
    • References and Bibtex, written by Yena Joo.
    • 319 |
    • PDF outputs, written by Yena Joo.
    • 320 |
    • 321 | here::here() and filepaths, written by Matthew Wankiewicz.
    • 322 |
    323 |
    324 |
    325 |

    326 | Git outta here

    327 |

    How to run this module:

    328 |
    329 | learnr::run_tutorial("git_outta_here", package = "DoSStoolkit")
    330 |

    Module content:

    331 |
      332 |
    • What is version control and GitHub?, written by Mariam Walaa.
    • 333 |
    • Git: pull, status, add, commit, push, written by Mariam Walaa.
    • 334 |
    • Branches in GitHub, written by Matthew Wankiewicz.
    • 335 |
    • Dealing with Conflicts, written by Matthew Wankiewicz.
    • 336 |
    • Putting (G)it All together in RStudio, written by Matthew Wankiewicz.
    • 337 |
    338 |
    339 |
    340 |

    341 | Indistinguishable from magic

    342 |

    How to run this module:

    343 |
    344 | learnr::run_tutorial("indistinguishable_from_magic", package = "DoSStoolkit")
    345 |

    Module content:

    346 |
      347 |
    • Coding style, written by Marija Pejcinovska.
    • 348 |
    • Static maps with ggmap, by Annie Collins.
    • 349 |
    • Writing R Packages, written by Matthew Wankiewicz.
    • 350 |
    • Getting started with Blogdown, written by Annie Collins.
    • 351 |
    • Getting started with Shiny, written by Matthew Wankiewicz.
    • 352 |
    353 |
    354 |
    355 |
    356 |

    357 | Contributors

    358 |
      359 |
    • Annie Collins is an undergraduate student in the Department of Mathematics specializing in applied mathematics and statistics with a minor in history and philosophy of science. In her free time, she focuses her efforts on student governance, promoting women’s representation in STEM, and working with data in the non-profit and charitable sector.
    • 360 |
    • Haoluan Chen is an undergraduate student in the Department of Statistical Science specializing in applied statistics. He is interested in applying data science techniques, especially in NLP, to gain insight from the data.
    • 361 |
    • Isaac Ehrlich is an undergraduate student in Statistics and Cognitive Science at the University of Toronto. He enjoys using R for everything from analysing trends in his recent movie-viewing history, to his past research building models on human categorization.
    • 362 |
    • Mariam Walaa is an undergraduate student in the Department of Computer and Mathematical Sciences at University of Toronto Scarborough, majoring in Mathematics and minoring in GIS and statistics. Mariam enjoys learning about how to work with data such as spatial and text data to extract insights.
    • 363 |
    • Marija Pejcinovska is a graduate student in the Department of Statistical Sciences. Her research is motivated by modelling challenges that arise with “complicated” data (sparse/highly biased/poor quality data), usually in the context of social or health inequalities.
    • 364 |
    • Matthew Wankiewicz is an undergraduate student at the University of Toronto, majoring in Statistics and minoring in Mathematics and the History and Philosophy of Science.
    • 365 |
    • Michael Chong is a graduate student in the Department of Statistical Sciences. His research aims to build statistical models for demographic estimation in contexts where high quality data are unavailable. There is almost always an active R session on his computer!
    • 366 |
    • Paul Hodgetts is a Master of Information candidate concentrating in Human-Centred Data Science in the Faculty of Information, University of Toronto. He sincerely believes that Calvin and Hobbes is the greatest comic ever produced.
    • 367 |
    • Rohan Alexander is an assistant professor in the Faculty of Information and the Department of Statistical Sciences. Some people convert to catholicism upon marriage, Rohan converted to R. His greatest professional achievement is probably getting a pull request accepted into R for Data Science (it was just fixing a minor typo but still).
    • 368 |
    • Samantha-Jo Caetano is an assistant professor (teaching stream) in the Department of Statistical Sciences. She loves statistics, socializing, her family, and her dogs, not necessarily in that order.
    • 369 |
    • Shirley Deng is an undergraduate student specializing in Statistics and majoring in Mathematics. Meticulous and soft-hearted, she often finds herself engrossed in new pastimes by the second at the influence of her peers. One of which that has remained a longtime constant - spending an excessive amount of time helping people debug their R code.
    • 370 |
    • Yena Joo is an undergraduate student majoring in Economics and double minoring in Statistics and Computer Science.
    • 371 |
    372 |
    373 |
    374 |

    375 | Pedagogical underpinnings

    376 |

    Coming soon.

    377 |
    378 |
    379 |

    380 | Acknowledgements

    381 |

    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.

    382 |

    We’d like to acknowledge the help of:

    383 |
      384 |
    • Liza Bolton
    • 385 |
    • Monica Alexander
    • 386 |
    • Sabrina Sixta
    • 387 |
    388 |

    We’d like to thank Alex Cookson for his collection of datasets.

    389 |

    This toolkit builds on, and complements, the work of many others, including:

    390 | 406 |

    Rohan would like to thank Greg Wilson, for sharing his experience, thoughts, and leadership.

    407 |
    408 |
    409 |

    410 | References

    411 |

    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.

    412 | 427 |
    428 | 435 |
    436 |

    437 | Next steps

    438 |
      439 |
    • Assessment
    • 440 |
    • Teaching
    • 441 |
    • French language version
    • 442 |
    443 |
    444 |
    445 |

    446 | Citation

    447 |

    We have a pre-print coming soon.

    448 |
    449 |
    450 |

    451 | How to contribute

    452 |

    The best way to contribute fixes and minor typos is to make a pull request on GitHub.

    453 |

    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.

    454 |
    455 |
    456 |

    457 | Contact

    458 |

    Please contact Rohan () with any questions, comments, and suggestions.

    459 |
    460 | 461 |
    462 | 463 | 499 |
    500 | 501 | 502 |
    505 | 506 |
    507 |

    Site built with pkgdown 1.6.1.

    508 |
    509 | 510 |
    511 |
    512 | 513 | 514 | 515 | 516 | 517 | 518 | -------------------------------------------------------------------------------- /docs/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /docs/pkgdown.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer */ 2 | 3 | /** 4 | * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ 5 | * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css 6 | * 7 | * .Site -> body > .container 8 | * .Site-content -> body > .container .row 9 | * .footer -> footer 10 | * 11 | * Key idea seems to be to ensure that .container and __all its parents__ 12 | * have height set to 100% 13 | * 14 | */ 15 | 16 | html, body { 17 | height: 100%; 18 | } 19 | 20 | body { 21 | position: relative; 22 | } 23 | 24 | body > .container { 25 | display: flex; 26 | height: 100%; 27 | flex-direction: column; 28 | } 29 | 30 | body > .container .row { 31 | flex: 1 0 auto; 32 | } 33 | 34 | footer { 35 | margin-top: 45px; 36 | padding: 35px 0 36px; 37 | border-top: 1px solid #e5e5e5; 38 | color: #666; 39 | display: flex; 40 | flex-shrink: 0; 41 | } 42 | footer p { 43 | margin-bottom: 0; 44 | } 45 | footer div { 46 | flex: 1; 47 | } 48 | footer .pkgdown { 49 | text-align: right; 50 | } 51 | footer p { 52 | margin-bottom: 0; 53 | } 54 | 55 | img.icon { 56 | float: right; 57 | } 58 | 59 | img { 60 | max-width: 100%; 61 | } 62 | 63 | /* Fix bug in bootstrap (only seen in firefox) */ 64 | summary { 65 | display: list-item; 66 | } 67 | 68 | /* Typographic tweaking ---------------------------------*/ 69 | 70 | .contents .page-header { 71 | margin-top: calc(-60px + 1em); 72 | } 73 | 74 | dd { 75 | margin-left: 3em; 76 | } 77 | 78 | /* Section anchors ---------------------------------*/ 79 | 80 | a.anchor { 81 | margin-left: -30px; 82 | display:inline-block; 83 | width: 30px; 84 | height: 30px; 85 | visibility: hidden; 86 | 87 | background-image: url(./link.svg); 88 | background-repeat: no-repeat; 89 | background-size: 20px 20px; 90 | background-position: center center; 91 | } 92 | 93 | .hasAnchor:hover a.anchor { 94 | visibility: visible; 95 | } 96 | 97 | @media (max-width: 767px) { 98 | .hasAnchor:hover a.anchor { 99 | visibility: hidden; 100 | } 101 | } 102 | 103 | 104 | /* Fixes for fixed navbar --------------------------*/ 105 | 106 | .contents h1, .contents h2, .contents h3, .contents h4 { 107 | padding-top: 60px; 108 | margin-top: -40px; 109 | } 110 | 111 | /* Navbar submenu --------------------------*/ 112 | 113 | .dropdown-submenu { 114 | position: relative; 115 | } 116 | 117 | .dropdown-submenu>.dropdown-menu { 118 | top: 0; 119 | left: 100%; 120 | margin-top: -6px; 121 | margin-left: -1px; 122 | border-radius: 0 6px 6px 6px; 123 | } 124 | 125 | .dropdown-submenu:hover>.dropdown-menu { 126 | display: block; 127 | } 128 | 129 | .dropdown-submenu>a:after { 130 | display: block; 131 | content: " "; 132 | float: right; 133 | width: 0; 134 | height: 0; 135 | border-color: transparent; 136 | border-style: solid; 137 | border-width: 5px 0 5px 5px; 138 | border-left-color: #cccccc; 139 | margin-top: 5px; 140 | margin-right: -10px; 141 | } 142 | 143 | .dropdown-submenu:hover>a:after { 144 | border-left-color: #ffffff; 145 | } 146 | 147 | .dropdown-submenu.pull-left { 148 | float: none; 149 | } 150 | 151 | .dropdown-submenu.pull-left>.dropdown-menu { 152 | left: -100%; 153 | margin-left: 10px; 154 | border-radius: 6px 0 6px 6px; 155 | } 156 | 157 | /* Sidebar --------------------------*/ 158 | 159 | #pkgdown-sidebar { 160 | margin-top: 30px; 161 | position: -webkit-sticky; 162 | position: sticky; 163 | top: 70px; 164 | } 165 | 166 | #pkgdown-sidebar h2 { 167 | font-size: 1.5em; 168 | margin-top: 1em; 169 | } 170 | 171 | #pkgdown-sidebar h2:first-child { 172 | margin-top: 0; 173 | } 174 | 175 | #pkgdown-sidebar .list-unstyled li { 176 | margin-bottom: 0.5em; 177 | } 178 | 179 | /* bootstrap-toc tweaks ------------------------------------------------------*/ 180 | 181 | /* All levels of nav */ 182 | 183 | nav[data-toggle='toc'] .nav > li > a { 184 | padding: 4px 20px 4px 6px; 185 | font-size: 1.5rem; 186 | font-weight: 400; 187 | color: inherit; 188 | } 189 | 190 | nav[data-toggle='toc'] .nav > li > a:hover, 191 | nav[data-toggle='toc'] .nav > li > a:focus { 192 | padding-left: 5px; 193 | color: inherit; 194 | border-left: 1px solid #878787; 195 | } 196 | 197 | nav[data-toggle='toc'] .nav > .active > a, 198 | nav[data-toggle='toc'] .nav > .active:hover > a, 199 | nav[data-toggle='toc'] .nav > .active:focus > a { 200 | padding-left: 5px; 201 | font-size: 1.5rem; 202 | font-weight: 400; 203 | color: inherit; 204 | border-left: 2px solid #878787; 205 | } 206 | 207 | /* Nav: second level (shown on .active) */ 208 | 209 | nav[data-toggle='toc'] .nav .nav { 210 | display: none; /* Hide by default, but at >768px, show it */ 211 | padding-bottom: 10px; 212 | } 213 | 214 | nav[data-toggle='toc'] .nav .nav > li > a { 215 | padding-left: 16px; 216 | font-size: 1.35rem; 217 | } 218 | 219 | nav[data-toggle='toc'] .nav .nav > li > a:hover, 220 | nav[data-toggle='toc'] .nav .nav > li > a:focus { 221 | padding-left: 15px; 222 | } 223 | 224 | nav[data-toggle='toc'] .nav .nav > .active > a, 225 | nav[data-toggle='toc'] .nav .nav > .active:hover > a, 226 | nav[data-toggle='toc'] .nav .nav > .active:focus > a { 227 | padding-left: 15px; 228 | font-weight: 500; 229 | font-size: 1.35rem; 230 | } 231 | 232 | /* orcid ------------------------------------------------------------------- */ 233 | 234 | .orcid { 235 | font-size: 16px; 236 | color: #A6CE39; 237 | /* margins are required by official ORCID trademark and display guidelines */ 238 | margin-left:4px; 239 | margin-right:4px; 240 | vertical-align: middle; 241 | } 242 | 243 | /* Reference index & topics ----------------------------------------------- */ 244 | 245 | .ref-index th {font-weight: normal;} 246 | 247 | .ref-index td {vertical-align: top; min-width: 100px} 248 | .ref-index .icon {width: 40px;} 249 | .ref-index .alias {width: 40%;} 250 | .ref-index-icons .alias {width: calc(40% - 40px);} 251 | .ref-index .title {width: 60%;} 252 | 253 | .ref-arguments th {text-align: right; padding-right: 10px;} 254 | .ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} 255 | .ref-arguments .name {width: 20%;} 256 | .ref-arguments .desc {width: 80%;} 257 | 258 | /* Nice scrolling for wide elements --------------------------------------- */ 259 | 260 | table { 261 | display: block; 262 | overflow: auto; 263 | } 264 | 265 | /* Syntax highlighting ---------------------------------------------------- */ 266 | 267 | pre { 268 | word-wrap: normal; 269 | word-break: normal; 270 | border: 1px solid #eee; 271 | } 272 | 273 | pre, code { 274 | background-color: #f8f8f8; 275 | color: #333; 276 | } 277 | 278 | pre code { 279 | overflow: auto; 280 | word-wrap: normal; 281 | white-space: pre; 282 | } 283 | 284 | pre .img { 285 | margin: 5px 0; 286 | } 287 | 288 | pre .img img { 289 | background-color: #fff; 290 | display: block; 291 | height: auto; 292 | } 293 | 294 | code a, pre a { 295 | color: #375f84; 296 | } 297 | 298 | a.sourceLine:hover { 299 | text-decoration: none; 300 | } 301 | 302 | .fl {color: #1514b5;} 303 | .fu {color: #000000;} /* function */ 304 | .ch,.st {color: #036a07;} /* string */ 305 | .kw {color: #264D66;} /* keyword */ 306 | .co {color: #888888;} /* comment */ 307 | 308 | .message { color: black; font-weight: bolder;} 309 | .error { color: orange; font-weight: bolder;} 310 | .warning { color: #6A0366; font-weight: bolder;} 311 | 312 | /* Clipboard --------------------------*/ 313 | 314 | .hasCopyButton { 315 | position: relative; 316 | } 317 | 318 | .btn-copy-ex { 319 | position: absolute; 320 | right: 0; 321 | top: 0; 322 | visibility: hidden; 323 | } 324 | 325 | .hasCopyButton:hover button.btn-copy-ex { 326 | visibility: visible; 327 | } 328 | 329 | /* headroom.js ------------------------ */ 330 | 331 | .headroom { 332 | will-change: transform; 333 | transition: transform 200ms linear; 334 | } 335 | .headroom--pinned { 336 | transform: translateY(0%); 337 | } 338 | .headroom--unpinned { 339 | transform: translateY(-100%); 340 | } 341 | 342 | /* mark.js ----------------------------*/ 343 | 344 | mark { 345 | background-color: rgba(255, 255, 51, 0.5); 346 | border-bottom: 2px solid rgba(255, 153, 51, 0.3); 347 | padding: 1px; 348 | } 349 | 350 | /* vertical spacing after htmlwidgets */ 351 | .html-widget { 352 | margin-bottom: 10px; 353 | } 354 | 355 | /* fontawesome ------------------------ */ 356 | 357 | .fab { 358 | font-family: "Font Awesome 5 Brands" !important; 359 | } 360 | 361 | /* don't display links in code chunks when printing */ 362 | /* source: https://stackoverflow.com/a/10781533 */ 363 | @media print { 364 | code a:link:after, code a:visited:after { 365 | content: ""; 366 | } 367 | } 368 | -------------------------------------------------------------------------------- /docs/pkgdown.js: -------------------------------------------------------------------------------- 1 | /* http://gregfranko.com/blog/jquery-best-practices/ */ 2 | (function($) { 3 | $(function() { 4 | 5 | $('.navbar-fixed-top').headroom(); 6 | 7 | $('body').css('padding-top', $('.navbar').height() + 10); 8 | $(window).resize(function(){ 9 | $('body').css('padding-top', $('.navbar').height() + 10); 10 | }); 11 | 12 | $('[data-toggle="tooltip"]').tooltip(); 13 | 14 | var cur_path = paths(location.pathname); 15 | var links = $("#navbar ul li a"); 16 | var max_length = -1; 17 | var pos = -1; 18 | for (var i = 0; i < links.length; i++) { 19 | if (links[i].getAttribute("href") === "#") 20 | continue; 21 | // Ignore external links 22 | if (links[i].host !== location.host) 23 | continue; 24 | 25 | var nav_path = paths(links[i].pathname); 26 | 27 | var length = prefix_length(nav_path, cur_path); 28 | if (length > max_length) { 29 | max_length = length; 30 | pos = i; 31 | } 32 | } 33 | 34 | // Add class to parent
  • , and enclosing
  • if in dropdown 35 | if (pos >= 0) { 36 | var menu_anchor = $(links[pos]); 37 | menu_anchor.parent().addClass("active"); 38 | menu_anchor.closest("li.dropdown").addClass("active"); 39 | } 40 | }); 41 | 42 | function paths(pathname) { 43 | var pieces = pathname.split("/"); 44 | pieces.shift(); // always starts with / 45 | 46 | var end = pieces[pieces.length - 1]; 47 | if (end === "index.html" || end === "") 48 | pieces.pop(); 49 | return(pieces); 50 | } 51 | 52 | // Returns -1 if not found 53 | function prefix_length(needle, haystack) { 54 | if (needle.length > haystack.length) 55 | return(-1); 56 | 57 | // Special case for length-0 haystack, since for loop won't run 58 | if (haystack.length === 0) { 59 | return(needle.length === 0 ? 0 : -1); 60 | } 61 | 62 | for (var i = 0; i < haystack.length; i++) { 63 | if (needle[i] != haystack[i]) 64 | return(i); 65 | } 66 | 67 | return(haystack.length); 68 | } 69 | 70 | /* Clipboard --------------------------*/ 71 | 72 | function changeTooltipMessage(element, msg) { 73 | var tooltipOriginalTitle=element.getAttribute('data-original-title'); 74 | element.setAttribute('data-original-title', msg); 75 | $(element).tooltip('show'); 76 | element.setAttribute('data-original-title', tooltipOriginalTitle); 77 | } 78 | 79 | if(ClipboardJS.isSupported()) { 80 | $(document).ready(function() { 81 | var copyButton = ""; 82 | 83 | $(".examples, div.sourceCode").addClass("hasCopyButton"); 84 | 85 | // Insert copy buttons: 86 | $(copyButton).prependTo(".hasCopyButton"); 87 | 88 | // Initialize tooltips: 89 | $('.btn-copy-ex').tooltip({container: 'body'}); 90 | 91 | // Initialize clipboard: 92 | var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { 93 | text: function(trigger) { 94 | return trigger.parentNode.textContent; 95 | } 96 | }); 97 | 98 | clipboardBtnCopies.on('success', function(e) { 99 | changeTooltipMessage(e.trigger, 'Copied!'); 100 | e.clearSelection(); 101 | }); 102 | 103 | clipboardBtnCopies.on('error', function() { 104 | changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); 105 | }); 106 | }); 107 | } 108 | })(window.jQuery || window.$) 109 | -------------------------------------------------------------------------------- /docs/pkgdown.yml: -------------------------------------------------------------------------------- 1 | pandoc: 2.11.2 2 | pkgdown: 1.6.1 3 | pkgdown_sha: ~ 4 | articles: {} 5 | last_built: 2021-05-18T13:24Z 6 | 7 | -------------------------------------------------------------------------------- /docs/reference/Rplot001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/docs/reference/Rplot001.png -------------------------------------------------------------------------------- /docs/reference/figures/stitches_brown_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/docs/reference/figures/stitches_brown_hex.png -------------------------------------------------------------------------------- /docs/reference/figures/stitches_green_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/docs/reference/figures/stitches_green_hex.png -------------------------------------------------------------------------------- /docs/reference/figures/stitches_hex_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/docs/reference/figures/stitches_hex_all.png -------------------------------------------------------------------------------- /docs/reference/figures/stitches_white_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/docs/reference/figures/stitches_white_hex.png -------------------------------------------------------------------------------- /docs/reference/figures/stitches_yellow_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/docs/reference/figures/stitches_yellow_hex.png -------------------------------------------------------------------------------- /docs/reference/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Hello, World! — hello • DoSStoolkit 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
    63 |
    64 | 103 | 104 | 105 | 106 |
    107 | 108 |
    109 |
    110 | 115 | 116 |
    117 |

    Prints 'Hello, world!'.

    118 |
    119 | 120 |
    hello()
    121 | 122 | 123 | 124 |

    Examples

    125 |
    hello() 126 |
    #> [1] "Hello, world!"
    127 |
    128 | 133 |
    134 | 135 | 136 |
    137 | 140 | 141 |
    142 |

    Site built with pkgdown 1.6.1.

    143 |
    144 | 145 |
    146 |
    147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /docs/reference/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Function reference • DoSStoolkit 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
    62 |
    63 | 102 | 103 | 104 | 105 |
    106 | 107 |
    108 |
    109 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 138 | 139 | 140 | 141 |
    124 |

    All functions

    125 |

    126 |
    136 |

    hello()

    137 |

    Hello, World!

    142 |
    143 | 144 | 149 |
    150 | 151 | 152 |
    153 | 156 | 157 |
    158 |

    Site built with pkgdown 1.6.1.

    159 |
    160 | 161 |
    162 |
    163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /inst/tutorials/git_outta_here/images/64_add-commit-push.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/git_outta_here/images/64_add-commit-push.PNG -------------------------------------------------------------------------------- /inst/tutorials/git_outta_here/images/64_git-init.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/git_outta_here/images/64_git-init.PNG -------------------------------------------------------------------------------- /inst/tutorials/git_outta_here/images/64_git-status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/git_outta_here/images/64_git-status.PNG -------------------------------------------------------------------------------- /inst/tutorials/git_outta_here/images/69_logo_stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/git_outta_here/images/69_logo_stackoverflow.png -------------------------------------------------------------------------------- /inst/tutorials/git_outta_here/images/69_reprex_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/git_outta_here/images/69_reprex_example.png -------------------------------------------------------------------------------- /inst/tutorials/git_outta_here/images/69_stackoverflow_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/git_outta_here/images/69_stackoverflow_search.png -------------------------------------------------------------------------------- /inst/tutorials/hand_me_my_plyrs/images/32_culmen_depth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hand_me_my_plyrs/images/32_culmen_depth.png -------------------------------------------------------------------------------- /inst/tutorials/hand_me_my_plyrs/images/32_penguins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hand_me_my_plyrs/images/32_penguins.png -------------------------------------------------------------------------------- /inst/tutorials/he_was_a_d8er_boi/images/59_tidy-data-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/he_was_a_d8er_boi/images/59_tidy-data-2.jpg -------------------------------------------------------------------------------- /inst/tutorials/he_was_a_d8er_boi/images/59_tidy-data.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/he_was_a_d8er_boi/images/59_tidy-data.jpg -------------------------------------------------------------------------------- /inst/tutorials/hello_world/hello_world.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "DoSS Toolkit" 3 | subtitle: "Hello World!" 4 | date: "25 May 2021" 5 | output: 6 | learnr::tutorial: 7 | allow_skip: true 8 | runtime: shiny_prerendered 9 | description: "Get started with R" 10 | --- 11 | 12 | ```{r setup, include=FALSE} 13 | knitr::opts_chunk$set(echo = TRUE, warning = FALSE, error = FALSE) 14 | library(learnr) 15 | # tutorial_options(exercise.eval = FALSE) 16 | library(tidyverse) 17 | # library(gradethis) 18 | # gradethis::gradethis_setup() 19 | ``` 20 | 21 | 22 | 23 | 24 | ## Introduction 25 | 26 | Written by Rohan Alexander. 27 | 28 | Welcome to the first module. In this module we focus on getting R and R Studio, and then showing you a couple of motivating examples that you'll soon have the skills to be able to write yourself. 29 | 30 | Don't worry too much if the specifics of those examples leave you a little lost - that's normal. If you stick with it then it'll all make sense eventually. 31 | 32 | Welcome aboard! 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | ## Getting and setting up RStudio 43 | 44 | Written by Rohan Alexander and Annie Collins. 45 | 46 | ### Introduction 47 | 48 | In this lesson, you will learn how to: 49 | 50 | - download R and RStudio Desktop. 51 | 52 | ### R vs. RStudio 53 | 54 | Before we get started, it is important to understand the different components that make coding with R possible. 55 | 56 | R is different from RStudio and you need to download both. R refers to the programming language we're using, and RStudio is the desktop application (in technical language, the IDE or "integrated development environment") that makes it possible to read, write, and view the output of our R code. You can technically use R without RStudio, but you cannot use RStudio without R. 57 | 58 | University of Toronto Professor Liza Bolton has a wonderful analogy: if R is like a car engine, RStudio is like the car. While it's possible to use a car engine directly, most of us find it helpful to use a car. So we're going to use RStudio to interface with R. 59 | 60 | 61 | ### Getting R 62 | 63 | Your first step is to download R. It can be downloaded for free from the R website: https://www.r-project.org. It's not the most user-friendly website ever built, so I've taken a series of screenshots to help explain things. First you need to click **download R**. 64 | 65 | 66 | ```{r, echo = FALSE, out.width="90%"} 67 | knitr::include_graphics("images/01-getting_started_1.png") 68 | ``` 69 | 70 | Then you need to pick a mirror. This is done for largely historical reasons - when the internet was slow it could be faster to get it from a source that was closer. These days it doesn't really matter, and the web interface (shown below) generally looks the same across all mirrors. Just pick a version from a place that you're familiar with. 71 | 72 | For anyone near the University of Toronto, the university hosts its own mirror: https://utstat.toronto.edu/cran/. 73 | 74 | If you don't know what to pick then you can use the one that I always use - https://cran.csiro.au/. 75 | 76 | ```{r, echo = FALSE, out.width="90%"} 77 | knitr::include_graphics("images/01-getting_started_2.png") 78 | ``` 79 | 80 | You then need to download the appropriate version for you depending on whether you've got Windows, Mac, or Linux. I'll pick Mac, but the next page looks very similar for all three. 81 | 82 | ```{r, echo = FALSE, out.width="90%"} 83 | knitr::include_graphics("images/01-getting_started_3.png") 84 | ``` 85 | 86 | At this point, you can click to do the actual download. This will differ depending on exactly when you are following these instructions, but you're looking for something like **R-4.0.4.pkg**. 87 | 88 | ```{r, echo = FALSE, out.width="90%"} 89 | knitr::include_graphics("images/01-getting_started_4.png") 90 | ``` 91 | 92 | 93 | After that downloads you can install it on your computer like any other application. 94 | 95 | ### Getting RStudio 96 | 97 | To get started, visit the RStudio website: https://rstudio.com. Then click on download. 98 | 99 | ```{r, echo = FALSE, out.width="90%"} 100 | knitr::include_graphics("images/01-getting_started_6.png") 101 | ``` 102 | 103 | 104 | You want RStudio Desktop, which is free. Click download and it should try to guess your operating system and provide the correction option for your set-up. In my case, this is Mac, so I can click **Download**, and then install it like any other application. 105 | 106 | ```{r, echo = FALSE, out.width="90%"} 107 | knitr::include_graphics("images/01-getting_started_7.png") 108 | ``` 109 | 110 | ### Next Steps 111 | 112 | Congratulations! You are now ready to start running R code in RStudio Desktop. In the next lesson, you will learn how to navigate RStudio and some of its key features that will come in handy once you start programming in R. 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | ## Getting to know what is what 126 | 127 | Written by Rohan Alexander and Annie Collins. 128 | 129 | ### Introduction 130 | 131 | In this lesson, you will learn how to: 132 | 133 | - Navigate the RStudio interface; and 134 | - Run R code using RStudio 135 | 136 | 137 | Prerequisite skills include: 138 | 139 | - Downloading R and RStudio (see previous lesson). 140 | 141 | 142 | ### Basic Layout 143 | 144 | ```{r, echo = FALSE, out.width="90%"} 145 | knitr::include_graphics("images/02-rstudio-layout.png") 146 | ``` 147 | 148 | When you open RStudio on desktop, it should look fairly similar to RStudio Cloud (the internet-based version of RStudio that you likely used to load this module). There are four main panes: 149 | 150 | - **Scripts**: the upper left corner of RStudio Desktop is where any R Script or R Markdown files will appear when you open them. You can open more than one at once, in which case they will appear in separate tabs. You will also see relevant buttons for each document, such as search, save, and run. 151 | - **Environment**: this is where all your stored variables (vectors, data frames, models, plots, etc.) will be shown by name and type. In the "History" tab, you will also find a list of all code that you have run recently. 152 | - **Console**: the console is where code is run (either individual lines typed directly into the console, or blocks of code run from a script file) and its output is generally produced. While it is usually good practice to write your code in a script or markdown file, sometimes it is easier to run certain functions as single lines of code (actions that you won't need to reference later on, since the individual commands can be hard to find once more code is run). Most basic code output is also shown in the console, like data summaries, model summaries, data previews, etc. 153 | - **Files**: This pane displays all the files in your working directory, which is a folder stored on your computer that RStudio will use as its main directory for opening and saving files. It becomes very useful when you're working on a project that involves multiple scripts, files, external data sets, or graphics that contribute to your final project and all need to be easily accessible from the same place. 154 | 155 | See the video below for a more in-depth tour of the RStudio interface. 156 | 157 | ![](https://youtu.be/TdWY6YURY6k) 158 | 159 | ### More Advanced Features 160 | 161 | You'll notice that there are several tabs and buttons within each of these areas that I haven't mentioned yet. These all serve their own specific purpose which will become more clear as you start exploring the interface and running code yourself. Don't worry too much about everything that is going on. When a person steps into a plane cockpit for the first time it can be overwhelming and it's the same here - it's normal to not know where to look. Before too long you'll be navigating around RStudio comfortably. 162 | 163 | ### Next Steps 164 | 165 | The best way to learn R is to use R. In the next lesson we're going to walk you through a couple of exercises of things that you could accomplish with R once you're a little more familiar with it. We hope that you find it motivating and exciting. 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | ## Hello World! 185 | 186 | Written by Annie Collins. 187 | 188 | ### Introduction 189 | 190 | The purpose of this module is to give you an overview of a task you will be able to accomplish on your own once you gain some more experience using R. You do not need to understand the code; simply follow along and take note of any functions that seem interesting or useful to you! 191 | 192 | In this scenario, let's assume we're working for Toronto Public Health and we're looking at data about COVID-19 cases in Toronto throughout the pandemic. Specifically, we want to look at daily case numbers from different sources of infection - community spread, travel, outbreaks, etc. We have data collected by our front-line colleagues at the individual level, but it is slightly messy and contains more information than is relevant for our purposes. 193 | 194 | First we need to clean this data - make it as simple as possible and easy to work with - and then we can look into summarizing and examining different variables to draw conclusions about case numbers from different sources of infection. 195 | 196 | ### Video Walk Through 197 | 198 | This video provides a quick walkthrough of the process outlined in the following steps. 199 | 200 | ![](https://youtu.be/w_IOsVVg_QI) 201 | 202 | The following pages give a closer look at the individual functions and logic behind the loading, cleaning, and summarizing steps taken. 203 | 204 | ### Load Data 205 | 206 | Before we can even access our data, we need to load our R libraries You will learn more about what this actually means later, but for now, think of loading libraries as us telling the computer which tools we need for our upcoming tasks. 207 | 208 | ```{r libraries, warning = FALSE, message = FALSE} 209 | library(tidyverse) 210 | library(opendatatoronto) 211 | ``` 212 | 213 | 214 | Now we will load our data. Since our data is from Toronto Public Health, we are pulling it from the Toronto Open Data Portal and labeling it "covid_data". 215 | 216 | ```{r load-data, eval = FALSE, include = TRUE} 217 | covid_data <- 218 | list_package_resources("https://open.toronto.ca/dataset/covid-19-cases-in-toronto/") %>% 219 | get_resource() 220 | ``` 221 | 222 | ```{r, eval = TRUE, include = FALSE} 223 | # Use beow code for package (had to change in order to work with draft repo) 224 | covid_data <- read_csv(system.file("extdata", "covid_data.csv", package = "DoSStoolkit", mustWork = TRUE)) 225 | 226 | # covid_data <- read_csv("covid_data.csv") 227 | ``` 228 | 229 | To get an initial idea of the variables (columns) we're working with, we can load the first 20 rows of data and examine its contents and parameters. In R, this takes a form similar to a spreadsheet. 230 | 231 | ```{r} 232 | head(covid_data, 20) 233 | ``` 234 | 235 | 236 | 237 | 238 | Once all our data is loaded, we can start the cleaning process. 239 | 240 | ### Clean Existing Data 241 | 242 | The first step we will take is changing the "Episode Date" and "Reported Date" columns to a date format instead of a character format. This will allow us to use functions and operations with this data as if it were a date instead of as a string of characters. 243 | ```{r date-cleaning} 244 | covid_data$`Episode Date` <- as.Date(covid_data$`Episode Date`) 245 | covid_data$`Reported Date` <- as.Date(covid_data$`Reported Date`) 246 | ``` 247 | 248 | Since we're looking at source of infection, we don't really care about the outcomes of individual cases. We also don't need the "Outbreak Associated" column, since this data is contained (with more detail) in the "Source of Infection" column. To remove these unnecessary rows from our data, we can select only the rows we wish to keep. 249 | 250 | ```{r remove-columns} 251 | covid_data <- select(covid_data, `Age Group`:Outcome) 252 | ``` 253 | 254 | 255 | ```{r sounces-infection} 256 | unique(covid_data$`Source of Infection`) 257 | ``` 258 | If we look at the classifications (unique values) for "Source of Infection", we notice that "N/A - Outbreak associated" is a bit out of place given we have removed the "Outbreak Associated" column. We can replace this classification to more simply read "Outbreak associated". 259 | ```{r reassign-outbreak} 260 | covid_data$`Source of Infection`[covid_data$`Source of Infection` == "N/A - Outbreak associated"] <- "Outbreak associated" 261 | ``` 262 | 263 | 264 | Given the nature of this data, it is likely that the most recent date's COVID-19 case data has not been recorded in its entirety and is inaccurate or an outlier to some extent, so we will also filter this data out of our data set. 265 | ```{r remove-last-date} 266 | covid_data <- filter(covid_data, `Reported Date` < max(covid_data$`Reported Date`)) 267 | ``` 268 | 269 | 270 | 271 | ```{r} 272 | head(covid_data, 20) 273 | ``` 274 | 275 | Looking at our data as a whole, we can see that we've restricted the data to only the variables we want to work with, have reassigned the date columns to have type ``, and have renamed an awkward variable classification in "Source of Infection". Now we can summarize our data! 276 | 277 | ### Summarize Data 278 | 279 | In our data, there are generally multiple cases reported per day, and we want to gain a better understanding of our variables across *all* cases reported on a given day. To do so, we will create a summary table from our original data listing the number of cases per source of infection, along with the total number of cases, for each day in our data. 280 | 281 | ```{r daily-sum} 282 | covid_daily_stats <- 283 | covid_data %>% 284 | group_by(`Reported Date`) %>% 285 | summarise( 286 | travel = sum(`Source of Infection` == "Travel"), 287 | healthcare = sum(`Source of Infection` == "Healthcare"), 288 | outbreak = sum(`Source of Infection` == "Outbreak associated"), 289 | contact = sum(`Source of Infection` == "Close contact"), 290 | community = sum(`Source of Infection` == "Community"), 291 | unknown = sum(`Source of Infection` == "Unknown/Missing"), 292 | institutional = sum(`Source of Infection` == "Institutional"), 293 | pending = sum(`Source of Infection` == "Pending"), 294 | total = n() 295 | ) 296 | head(covid_daily_stats, 30) 297 | ``` 298 | 299 | From this table, we can look at the daily summaries holistically or summarize further, for instance by looking at some summary statistics for daily COVID-19 case totals. 300 | 301 | ```{r summary-stats} 302 | summary(covid_daily_stats$total) 303 | sum(covid_daily_stats$total) 304 | sum(covid_daily_stats$unknown)/sum(covid_daily_stats$total) 305 | ``` 306 | 307 | Now we know that the highest number of cases observed on a single day in the pandemic thus far is 1605, and that at least half of the recorded dates have seen over 154 cases. We can also see from the second and third calculations that there have been 83,403 in Toronto in total since the beginning of the pandemic, and that cases of unknown origin make up just over 42 percent of all cases. If we wanted to, we could go on to create graphs from this summary, like total cases per day over time or number of cases per source of infection. 308 | 309 | ```{r plot} 310 | colors <- c("Outbreak associated" = "red", "Close contact" = "blue", "Community spread" = "purple") 311 | covid_daily_stats %>% 312 | ggplot(aes(x=`Reported Date`)) + 313 | geom_line(aes(y=outbreak, color = "Outbreak associated"), group=1) + 314 | geom_line(aes(y=contact, color = "Close contact"), group=1) + 315 | geom_line(aes(y=community, color = "Community spread"), group=1) + 316 | labs(x="Reported Date", y="Number of Cases", color="Source of Infection") + 317 | ggtitle("COVID-19 Cases in Toronto") + 318 | scale_color_manual(values = colors) 319 | ``` 320 | 321 | ### Next Steps 322 | 323 | This may all seem very complex and unattainable right now, but when it's broken down step by step (or function by function) it will gradually become easier to see how you can use R to produce your desired statistics, graphics, and analyses. 324 | 325 | As you proceed through the following lessons, remember the process outlined here and take note of how powerful simple, individual functions can be when used together in the right context. You may also find it helpful to refer back to this module as an example of different functions used in context, or to see if you can use your new knowledge to reproduce the same results on your own. Good luck! 326 | 327 | 328 | 329 | 330 | 331 | 332 | ## Hello World, again! 333 | 334 | Written by Shirley Deng. 335 | 336 | ### Introduction 337 | 338 | In our second scenario, let's assume we've been diligently following social distancing guidelines and staying home amid the pandemic. It's rough not being able to go out and grab food with friends and family, but we make do. As a result, we've been using the SuperNoms app more than usual... but how $much$ more? All the promo codes SuperNoms has been providing recently make for great incentives to order more takeout. 339 | 340 | The Identispot music streaming service provides an analysis of users' listening habits at the end of every year, Identispot Unwrapped. We take inspiration from Identispot Unwrapped and track our SuperNoms orders for the month of January. We want to get a feel for our favourite restaurants, our favourite cuisine categories, and see if there are any patterns in our ordering habits - all things we can plot and graph visually. 341 | 342 | ### Data 343 | 344 | Based on our goal, it seems natural that we'd want to take note of our orders' restaurants, cuisine categories, and total cost. With consideration of all the new promotions on the SuperNoms app, we also take note of any discounts applied. 345 | 346 | For those unfamiliar with the SuperNoms app, each order can only be made from a single restaurant. Each restaurant is categorized under one style of cuisine, such as Fast Food, Indian, Pizza, or Desserts. Additionally, promotions offered on the app are \% discounts ranging from 10 to 40\% off. 347 | 348 | We store this information in a dataframe called `orders`, with variables (columns) `restaurant`, `order_total`, `promo_percent`, and `category` for the information we're keeping track of. 349 | 350 | ```{r fake-data} 351 | set.seed(334) 352 | sample_size <- 9 353 | order_total <- round(runif(n=sample_size, min=15, max=65), digits=2) 354 | promo_percent <- sample(c(0, 10, 15, 20, 25, 30, 40), size=sample_size, replace=TRUE) 355 | category <- sample(c("Fast Food", "Indian", "Pizza", "Burgers", "Middle Eastern", 356 | "Desserts", "American", "Wings", "Bubble Tea", "Caribbean", 357 | "Portuguese", "Filipino", "Cantonese", "Tacos", "Pasta"), 358 | size=sample_size, replace=TRUE) 359 | orders <- tibble(order_total, promo_percent, category) 360 | restaurant <- c("Mystical Noodle", "Wings R Wild", "Mystical Noodle", 361 | "Splenda Marmalade", "Slice of Flames", "Rando's", 362 | "Guajillo", "SharingTea", "Zotto Zotto") 363 | orders <- tibble(restaurant, orders) 364 | orders 365 | ``` 366 | 367 | ### Favourites 368 | 369 | First, let's take a look at the restaurants we ordered from. We can visualize how many times we're eaten from each restaurant with a bar graph, and see which one was our favourite. There are a variety of ways to do this with R, but here we've made use of the `ggplot2` package's function `geom_bar()`. 370 | 371 | ```{r restaurant} 372 | orders %>% 373 | ggplot(aes(x=restaurant)) + 374 | geom_bar(color = "#7570b3", fill = "#7570b3") + 375 | ggtitle("Restaurants") + 376 | theme(axis.text.x = element_text(angle = 90)) + 377 | xlab("Restaurant") + ylab("Count") 378 | ``` 379 | 380 | Looks like we ordered from Mystical Noodle twice as many times as any other restaurant! This doesn't mean much though, since we've only eaten at a total of eight restarants this month, and only once at every other one. 381 | 382 | We can do the same with the restaurants' cuisine categories, too. 383 | 384 | ```{r category} 385 | orders %>% 386 | ggplot(aes(x=category)) + 387 | geom_bar(color = "#66a61e", fill = "#66a61e") + 388 | ggtitle("Cuisine Categories") + 389 | theme(axis.text.x = element_text(angle = 90)) + 390 | xlab("Category") + ylab("Count") 391 | ``` 392 | 393 | Our favourite cuisine category of the month so far seems to be Cantonese, although not by much. 394 | 395 | ### Patterns 396 | 397 | We noted earlier that promo codes may infleunce our ordering habits. We can visualize the relationship between order totals and promo code % discounts with a scatterplot. Again, we make use of the `ggplot2` package, but this time using the function `geom_point()`. 398 | 399 | ```{r scatter} 400 | scatter <- 401 | orders %>% 402 | ggplot(aes(x=promo_percent, y=order_total)) + 403 | geom_point(color = "#1b9e77", fill = "#1b9e77") + 404 | ggtitle("Order Total vs. Promo Code Discount") + 405 | theme(axis.text.x = element_text(angle = 90)) + 406 | xlab("Promo Code Discount") + ylab("Order Total") 407 | 408 | scatter 409 | ``` 410 | 411 | At first glance, we don't see any obvious patterns. 412 | 413 | But! We can also fit a straight line to the points to help us see any patterns. Here, we do so using the `geom_smooth()` function, again, from the `ggplot2` package. 414 | 415 | ```{r lm} 416 | scatter + geom_smooth(method="lm") 417 | ``` 418 | 419 | We get a horizontal line, so it seems there isn't any relationship between promo code discounts and order totals. We've only ordered nine times so far, so we just may not have enough data to see a pattern yet. For the sake of data, looks like we're going to have to make more SuperNoms orders! 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | ## The R community 430 | 431 | Written by Annie Collins. 432 | 433 | ### Introduction 434 | 435 | Once you've gotten a basic handle on coding in R, there are plenty of ways to extend your learning and practice beyond the classroom. R has a global network of users of all levels and backgrounds, and these users have established a myriad of outlets for connecting with each other and sharing their R expertise, projects, and discoveries. 436 | 437 | In this module, we will look at three resources for participating in the R community: **R Weekly**, **R-Ladies**, and **R Meetups**. 438 | 439 | ### R Weekly 440 | 441 | > "R is growing very quickly, and there are lots of great blogs, tutorials and other formats of resources coming out every day. R Weekly wants to keep track of these great things in the R community and make it more accessible to everyone." 442 | 443 | R Weekly is a (you guessed it) weekly summary of all things R related: educational resources, new packages, videos, podcasts, examples of real world R use, and much more. All features are compiled and posted each Monday on [RWeekly.org](https://rweekly.org/) as well as delivered in the form of an e-newsletter to email subscribers. R Weekly is a great resource for keeping up to date with developments in the broader R community, as well as share your own projects with a large audience of R users of all levels. 444 | 445 | #### Get Involved 446 | 447 | - Check out the current and past iterations of R Weekly on their [website](https://rweekly.org/). 448 | - Subscribe to the R Weekly [mailing list](https://feedburner.google.com/fb/a/mailverify?uri=rweekly&loc=en_US). 449 | - Follow R Weekly on their various social media accounts: [Facebook](https://facebook.com/rweekly) and [Twitter](https://twitter.com/rweekly_org). 450 | 451 | ### R-Ladies 452 | 453 | > "R-Ladies is a worldwide organization whose mission is to promote gender diversity in the R community." 454 | 455 | R-Ladies focuses on increasing the proportion of underrepresented genders in the global R community through encouraging, inspiring, and empowering minority gender (cis/trans women, trans men, non binary, etc.) R users. Their efforts involve creating a global network of R leaders and learners via local meet ups, a directory of individual speaker profiles, and community and network-focused online communication channels (Twitter, Slack, Github, etc.). 456 | 457 | #### Get Involved 458 | 459 | - Follow @RLadiesGlobal on [Twitter](https://twitter.com/RLadiesGlobal). 460 | - Find your [local R-Ladies chapter](https://www.meetup.com/pro/rladies/) and meet-ups ([R-Ladies Toronto](https://www.meetup.com/rladies-toronto/) is co-organized by the University of Toronto's own Monica Alexander!). 461 | - Contribute to the R-Ladies Global [Github](https://github.com/rladies). 462 | - Join the R-Ladies community [Slack channel](https://rladies-community-slack.herokuapp.com/). 463 | 464 | 465 | ### R Meetups 466 | 467 | Online or in-person meet ups are a great way to meet like-minded individuals, exchange knowledge and experience, and develop your R skills and network. As mentioned previously, there are R-Ladies-specific meet ups, as well as a worldwide network of R User Groups, both of which have been sponsored by the R Consortium. 468 | 469 | #### Get Involved 470 | - Join the [Greater Toronto Area (GTA) R User Group](https://www.meetup.com/Greater-Toronto-Area-GTA-R-Users-Group/) 471 | or [find your local R User Group](https://www.meetup.com/pro/r-user-groups) 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | ## Summary and next steps 486 | 487 | Written by Rohan Alexander. 488 | 489 | Congratulations on making it this far. Learning a new skill can be intimidating, but the best way to learn R is to use R. I hope that this has given you a taste of what you will soon be able to do. We were all in your position once. 490 | 491 | You can start the next lesson by running: 492 | 493 | ```{r, eval = FALSE} 494 | learnr::run_tutorial("operating_in_an_error_prone_world", package = "DoSStoolkit") 495 | ``` 496 | 497 | 498 | 499 | 500 | -------------------------------------------------------------------------------- /inst/tutorials/hello_world/images/01-getting_started_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hello_world/images/01-getting_started_1.png -------------------------------------------------------------------------------- /inst/tutorials/hello_world/images/01-getting_started_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hello_world/images/01-getting_started_2.png -------------------------------------------------------------------------------- /inst/tutorials/hello_world/images/01-getting_started_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hello_world/images/01-getting_started_3.png -------------------------------------------------------------------------------- /inst/tutorials/hello_world/images/01-getting_started_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hello_world/images/01-getting_started_4.png -------------------------------------------------------------------------------- /inst/tutorials/hello_world/images/01-getting_started_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hello_world/images/01-getting_started_5.png -------------------------------------------------------------------------------- /inst/tutorials/hello_world/images/01-getting_started_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hello_world/images/01-getting_started_6.png -------------------------------------------------------------------------------- /inst/tutorials/hello_world/images/01-getting_started_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hello_world/images/01-getting_started_7.png -------------------------------------------------------------------------------- /inst/tutorials/hello_world/images/02-rstudio-layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/hello_world/images/02-rstudio-layout.png -------------------------------------------------------------------------------- /inst/tutorials/holding_the_chaos_at_bay/images/17_packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/holding_the_chaos_at_bay/images/17_packages.png -------------------------------------------------------------------------------- /inst/tutorials/holding_the_chaos_at_bay/images/20_updating-libraries-1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/holding_the_chaos_at_bay/images/20_updating-libraries-1.PNG -------------------------------------------------------------------------------- /inst/tutorials/holding_the_chaos_at_bay/images/20_updating-libraries-2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/holding_the_chaos_at_bay/images/20_updating-libraries-2.PNG -------------------------------------------------------------------------------- /inst/tutorials/holding_the_chaos_at_bay/images/folder-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/holding_the_chaos_at_bay/images/folder-setup.png -------------------------------------------------------------------------------- /inst/tutorials/holding_the_chaos_at_bay/images/r-project-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/holding_the_chaos_at_bay/images/r-project-example.png -------------------------------------------------------------------------------- /inst/tutorials/holding_the_chaos_at_bay/images/setwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/holding_the_chaos_at_bay/images/setwd.png -------------------------------------------------------------------------------- /inst/tutorials/indistinguishable_from_magic/images/64-coordinates-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/indistinguishable_from_magic/images/64-coordinates-map.png -------------------------------------------------------------------------------- /inst/tutorials/indistinguishable_from_magic/images/64-google-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/indistinguishable_from_magic/images/64-google-1.png -------------------------------------------------------------------------------- /inst/tutorials/indistinguishable_from_magic/images/64-google-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/indistinguishable_from_magic/images/64-google-2.png -------------------------------------------------------------------------------- /inst/tutorials/indistinguishable_from_magic/images/64-google-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/indistinguishable_from_magic/images/64-google-3.png -------------------------------------------------------------------------------- /inst/tutorials/indistinguishable_from_magic/images/84-new_site_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/indistinguishable_from_magic/images/84-new_site_1.png -------------------------------------------------------------------------------- /inst/tutorials/indistinguishable_from_magic/images/84-new_site_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/indistinguishable_from_magic/images/84-new_site_2.png -------------------------------------------------------------------------------- /inst/tutorials/indistinguishable_from_magic/images/84-new_site_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/indistinguishable_from_magic/images/84-new_site_3.png -------------------------------------------------------------------------------- /inst/tutorials/indistinguishable_from_magic/images/84-new_site_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/indistinguishable_from_magic/images/84-new_site_4.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/06_arrival-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/06_arrival-1.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/06_arrival-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/06_arrival-2.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/06_arrival_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/06_arrival_1.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/06_arrival_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/06_arrival_2.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/07_google-dates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/07_google-dates.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/07_google-tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/07_google-tools.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/07_stack-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/07_stack-screenshot.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/08_troubleshooting-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/08_troubleshooting-image.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/69_logo_stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/69_logo_stackoverflow.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/69_reprex_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/69_reprex_example.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/69_stackoverflow_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/69_stackoverflow_search.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/add-commit-push.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/add-commit-push.PNG -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/culmen_depth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/culmen_depth.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/folder-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/folder-setup.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/git-init.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/git-init.PNG -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/git-status.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/git-status.PNG -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/packages.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/penguins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/penguins.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/r-project-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/r-project-example.png -------------------------------------------------------------------------------- /inst/tutorials/operating_in_an_error_prone_world/images/setwd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/operating_in_an_error_prone_world/images/setwd.png -------------------------------------------------------------------------------- /inst/tutorials/r_marky_markdown/images/69_markdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/r_marky_markdown/images/69_markdown.png -------------------------------------------------------------------------------- /inst/tutorials/to_ggplot_or_not_to_ggplot/images/64-crime-density-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/to_ggplot_or_not_to_ggplot/images/64-crime-density-1.png -------------------------------------------------------------------------------- /inst/tutorials/to_ggplot_or_not_to_ggplot/images/64-crime-density-facet-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/to_ggplot_or_not_to_ggplot/images/64-crime-density-facet-1.png -------------------------------------------------------------------------------- /inst/tutorials/to_ggplot_or_not_to_ggplot/images/64-crime-scatter-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/inst/tutorials/to_ggplot_or_not_to_ggplot/images/64-crime-scatter-1.png -------------------------------------------------------------------------------- /man/figures/stitches_brown_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/man/figures/stitches_brown_hex.png -------------------------------------------------------------------------------- /man/figures/stitches_green_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/man/figures/stitches_green_hex.png -------------------------------------------------------------------------------- /man/figures/stitches_hex_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/man/figures/stitches_hex_all.png -------------------------------------------------------------------------------- /man/figures/stitches_white_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/man/figures/stitches_white_hex.png -------------------------------------------------------------------------------- /man/figures/stitches_yellow_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RohanAlexander/DoSStoolkit/aee16a3f740a5e44ef4f3a4dc7b7fe9553c089af/man/figures/stitches_yellow_hex.png -------------------------------------------------------------------------------- /man/hello.Rd: -------------------------------------------------------------------------------- 1 | \name{hello} 2 | \alias{hello} 3 | \title{Hello, World!} 4 | \usage{ 5 | hello() 6 | } 7 | \description{ 8 | Prints 'Hello, world!'. 9 | } 10 | \examples{ 11 | hello() 12 | } 13 | --------------------------------------------------------------------------------