Assignment 2021-07-06: Using RStudio and Rmarkdown

This first assignment is just to get used to using RStudio and Rmarkdown. Please email both your Rmarkdown document and the html report with your last name and no spaces in the file name to by 9AM tomorrow.


Practice with Code Chunks

Practice Running Code Chunks

First, things first, run the code chunk at the very top of the document, to set things up. Remember you can run a code chunk by:

  1. Clicking the green arrow on the upper right hand side of the code chunk
  2. Clicking “Run Current Chunk” in the “Run” drop down menu above
  3. Hitting Command + Shift + Return on a Mac or Ctrl + Shift + Enter on a PC

Now try running code chunks each of the three ways. Run the first chunk below using the arrow inside it

image(volcano)

Run this code chunk using the Run drop down menu

image(volcano)

Run this code chunk using keyboard commands

image(volcano)

You should have gotten the same output for all three chunks.


Comment out the code in the chunk below.

#image(volcano)


Make Your Own Code Chunk

Remember, to create a code chunk

  1. Type three backticks (`)
  2. Type curly braces ({})
  3. Type a lowercase r inside the curly braces
  4. Hit Enter twice
  5. Type three more backticks on the next line.

Make your own code chunk in the space below, and then copy the code between backticks image(volcano) and try running it.

image(volcano)


Practice with Text Formatting

For the lines of text below, add the appropriate symbols to make the text what it says. For example, if the line says, “Make me inline text” add backticks around it so it becomes inline text, Make me inline text. You can always reference the class materials or Google for help.


Make me bold


Make me italicized


Make me a header (whatever size you want)


Make me a different size of header (just not the same as the line above)

Make the stuff below into an unordered list.

  • satsuma
  • tomato
  • plum
  • star fruit
  • cherry

Make the stuff below into an ordered (numbered) list.

  1. banana
  2. pineapple
  3. apricot
  4. grape
  5. pomegranate

Format the code below so it will appear as inline code.

image(volcano)


Go to Tools > Global Options and take a screenshot confirming “Save .RData on exit:” is set to Never. Add a link to the picture below so it will appear when you knit the document.

no_RData


Knit

Finally, knitting this document by hitting the Knit button in RStudio and then submit both the knitted html file and this Rmarkdown file.