Professional Documents
Culture Documents
HW RMarkdownExample 20181228.Rmd
HW RMarkdownExample 20181228.Rmd
HW RMarkdownExample 20181228.Rmd
geometry: margin=0.75in
---
```{r echo=FALSE}
# Every HW R Markdown document should begin with all the lines of code above.
# Q1
This is question 1,
## (a)
which has a part (a)
## (b)
then part (b)
## (c)
and finally part (c)
# Q2
the next question is 2.
## (a)
It only has a part (a)
## (b)
and a part (b).
# Q3
## (a)
Some of this I borrowed from the R Markdown (by RStudio) tutorial:
[http://rmarkdown.rstudio.com/lesson-1.html](http://rmarkdown.rstudio.com/lesson-
1.html).
## (b)
End a line with two spaces
to start a new line. Plus, these two -- words are separated by a long dash.
> A long quote starts with a greater than sign and gets indented on both sides.
Well, only until you hit return to start a new line. I think I'll just repeat that
to demonstrate a long quote. A long quote starts with a greater than sign and gets
indented on both sides. Well, only until you hit return to start a new line.
## (c)
***
# Q4
## (a)
Here is an itemized list.
Leave a blank line before the list.
Indent using at least 4 spaces.
* item 1
* item 2
+ sub-item 1
+ sub-item 2
* item 3
+ sub-item 1
## (b)
1. item 1
2. item 2
a. sub-item 1
b. sub-item 2
3. item 3
a. sub-item 1
# Q5
## (a)
Now, I'll multiply `x` by `y`, save the result in `w` and then print `w`.
```{r}
w <- x * y
w
```
## (b)
Here is a table and I'll ask R display the values of `x` and `x^2` for me too
(remember, $x = `r x`$ from above).
You can even line-up the text in your tables as you like.
# Q6
## (a)
## (b)
Now, here are four plots and I'll show the R code
to demonstrate what I am doing to arrange the plots
in a 2x2 array.