Open a new R Markdown file

Problem 1: preliminaries

Edit the YAML header in your R Markdown file to include the following:

  1. Enter your full name in the author field
  2. Add the code to include a table of contents with toc_depth : 2
  3. Add a level 1 Header called “My level 1 header”
  4. Add a level 2 Header called “My level 2 header”
  5. Add a level 3 Header called “My level 3 header”
  6. click Knit to ensure that an html document is created.

NOTE You may want to knit your document after you complete each problem to ensure that the out put format is correct.

Problem 2: Lists

  1. Create a level 1 header titled “Problem 2: Lists”.
  2. Create a level 2 header titled “My favorite animals”. Then create a numbered list, ranking your top three favorite animals.
  3. Create a level 2 header called “Why use R Markdown?”. Then make a bulleted list (min 3 bullets) with a few of the benefits for using R Markdown.
  4. Create a level 2 header called “Sub bulleted list”. Then create a bulleted list (min 2 main bullets) with some of your favorite hobbies. For each main bullet, add at least one sub bullet briefly explaining why you like that hobby.

Problem 3: Code Chunks

  1. Create a level 1 header titled “Problem 3: Code Chunks”.
  2. Create a code chunk and set the chunk options to ensure that the code runs but is not shown in the html document. Inside of the chunk, copy the following line of code: date <- Sys.Date()
  3. Below the code chunk created above, type “I completed this assignment on:” and then include inline code that prints the date object you created in the chunk above

Problem 4: Equations

  1. Create a level 1 header titled “Problem 4: Equations”.
  2. Create an inline equation which produces the following: \(x \sim Normal(\mu = 0, \sigma = 1)\)
  1. Create a block equation for a simple linear model. Your equation should look like this:

\[ Y = \beta_0 + \beta_1 * X \]

Problem 5: Miscellany

  1. Create a level 1 header titled “Problem 5: Miscellany”.
  2. Make a line with the following: “My CMU email address is:”. Then, include your email address as a hyperlink.
  3. Include a line of text which includes at least one bold and one italicized word. Also be sure to include one subscript and one superscript.

Submission

Once your homework file is completed, you will need to knit the document into an html. Be sure to go over the rendered document to see if all the answer formats are correct.

For credit, you will submit both the .Rmd and .html files on D2L.