Files with extension .Rmd are RMarkdown files. We are going to practice compiling .Rmd files, i.e. knit them, to PDF files and to HTML pages.
- When you save this .Rmd file to your filespace, rename it to
HW0-RMarkdown-yourlastname.Rmd.
- Open the .Rmd file in RStudio, then change the name of the author to yours and also change the date.
- Click on the arrow next to the “Knit” button above and select “Knit to PDF”
- 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. (You will need to create an account.) Your analysis is now online! You can update what’s online by repeating steps 4 and 5.
- Copy the URL of the resulting RPubs page.
- Change the following URL to the URL of your RPubs page: http://rpubs.com/schutzd1/HW2
- Indicate how much time you spent on this assignment up to now:About 10-15 minutes.
- Re-knit this document to HTML and update what’s on RPubs.
- Finally, submit this file only,
HW0-RMarkdown-yourlastname.Rmd, to our shared Google homework submission folder.
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 Russ
Quick numbered lists:
- Steelers
- Everyone else
- Packers
LaTeX
\(\sin{\left(17x+e^{0.654}+\frac{1}{2}\right)}\)
Tables:
| Content Cell |
Content Cell |
| Content Cell |
Content Cell |