/summer-2018-lecture-slides

R Markdown source files for the CDS 101 slides used during the summer 2018 semester at George Mason University.

Primary LanguageHTMLCreative Commons Attribution Share Alike 4.0 InternationalCC-BY-SA-4.0

CDS 101 lecture slides (Summer 2018)

Build Status

Overview

These are the R Markdown source files for my CDS 101 lecture slides used during the summer 2018 semester at George Mason University. The R Markdown files are converted into remark HTML5 slideshows via the xaringan R package and presented directly from the web browser. The slides are also available for download in the PDF format under the latest release tag.

Prerequisites

The following software and R packages are required if you want to convert the R Markdown documents into remark slideshows yourself.

Software

  • R (>=3.4)

  • RStudio (>=1.1.456), preview release recommended

  • (Windows) Rtools: match the Rtools version to the R version and perform a full install

  • (Mac) Xcode Command Line Tools: needed for compiling source code in certain R packages

    # To install Xcode Command Line Tools, open up a terminal window and run the following
    xcode-select --install
  • (Optional) git: needed to clone the repository as a new project in RStudio

R packages

broom      (>= 0.5.0)
dplyr      (>= 0.7.6)
forcats    (>= 0.3.0)
ggplot2    (>= 3.0.0)
gridExtra  (>= 2.3)
infer      (>= 0.3.1)
lubridate  (>= 1.7.4)
modelr     (>= 0.1.2)
purrr      (>= 0.2.5)
readr      (>= 1.1.1)
robotstxt  (>= 0.6.0)
rvest      (>= 0.3.2)
stringr    (>= 1.3.1)
tidyr      (>= 0.8.1)
tidyverse  (>= 1.2.1)
xaringan   (>= 0.7)

See Install for an easy way to install the above R packages.

Install

Obtain a copy of this repo either by cloning it as a new RStudio project or by downloading the zip archive. Activate the project by clicking the file summer-2018-lecture-slides.Rproj in the RStudio file browser. Then, in an R console, type the following to install the necessary R packages:

install.packages("remotes", repos = "https://cran.rstudio.com")
remotes::install_deps()

Usage

The provided Makefile can be run within RStudio and contains rules for automatically knitting every R Markdown file in this repository and saving the result to a build/ directory. To run the Makefile, use the keyboard shortcut Ctrl+Alt+B or click the Build tab in the upper-right window and then click the Build All button. Once the build process completes, you will find the newly converted slideshows in a newly created folder called build/.

To view the slideshows, open the HTML files using your web browser. I recommend using Google Chrome for this as it seems to provide the best rendering of these files. Please note that these HTML files should not be moved to another location on your computer, otherwise they will not render correctly in your browser.

License

Creative Commons License

Unless otherwise noted, the materials in this repository are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.