Files with extension .Rmd are R Markdown files. We are going to practice compiling .Rmd files, i.e. knit them, to HTML pages.

  1. Change the name of the author above to yours and change the date
  2. Click on the arrow next to the “Knit” button above and select “Knit to HTML”
  3. In the resulting pop-up window of an HTML page, click on “Publish” (in blue on the top-right) -> RPubs -> Publish. Give it a title and a “slug” i.e. URL completion. Your analysis is now online! You can update what’s online by repeating steps 2 and 3.
  4. Copy the URL of the resulting RPubs page.
  5. Replace the https://www.nhl.com/ URL below with the URL of your RPubs page:
    My RPubs Document
  6. Indicate how much time you spent on this assignment up to now, including forking the HW-0 repo and setting up the RStudio project:
  7. Re-knit this document and update what’s on RPubs.
  8. Then submit this file only, HW-0.Rmd, following the steps on the repo page for HW-0.

Examples

We’ll learn R Markdown syntax as we go during the semester.

data(mtcars)
plot(mtcars$mpg, mtcars$disp)

See how we can seamlessly blend R code, R output, R plots, and text!

summary(mtcars$wt)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.513   2.581   3.325   3.217   3.610   5.424

blah blah

More Stuff

Quick lists:

  • Hello world
  • My name is Albert
    • Make sublists
    • Yeah

Quick numbered lists:

  1. Blah
  2. Blah
  3. Blah

Tables:

First Header Second Header
Content Cell Content Cell
Content Cell Content Cell

LaTeX

\(\exp\left(\frac{1}{2}\right)\)