Files with extension .Rmd are R Markdown files. We are going to practice compiling .Rmd files, i.e. knit them, to HTML pages.
- Change the name of the author above to yours and change the date
- Click on the arrow next to the “Knit” button above and select “Knit to HTML”
- 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.
- Copy the URL of the resulting RPubs page.
- Replace the https://www.nhl.com/ URL below with the URL of your RPubs page:
[My RPubs Document] (http://rpubs.com/tsingh/HW-0)
- Indicate how much time you spent on this assignment up to now, including forking the
HW-0 repo and setting up the RStudio project: 10 minutes
- Re-knit this document and update what’s on RPubs.
- 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
Quick numbered lists:
- Blah
- Blah
- Blah
Tables:
| Content Cell |
Content Cell |
| Content Cell |
Content Cell |
LaTeX
\(\exp\left(\frac{1}{2}\right)\)