Follow these steps for EVERY assignment:
Immediately re-save the Markdown document using “save as”, to change the the file name as needed (eg. “Lab_01_lastname”)
Answer the assignment questions in the newly saved Markdown document.
Save your Markdown document frequently, and also attempt to knit your document to Word frequently
Once you have completed your assignment, be sure to check all your spelling, and that figures / tables are appropriately formatted etc…
Knit your Markdown document to Word
Open up the resulting Word document, check that everything looks good; if NOT, then close the Word document, and go back into the Markdown document to make any edits; once complete, re-Knit the document to Word
Use the “Save as” menu option in Word to save your document as a PDF file, using the same naming convention (“Lab_xx_lastname”), where “xx” is the lab assignment number, and “lastname” is your own last name
Open up the PDF document, and verify that it looks correct
Submit your PDF document to the appropriate place in Canvas
Verify afterwards that your PDF document did indeed upload correctly
You must answer clearly and in full sentences. Make sure you answer the question explicitly.
Show the code you used to answer the question, as well as the output from that code (knitting does this automatically)
Describe what you did- explain (briefly) your rationale/thought process
DON’T FORGET to include figure captions for every figure
If you use a graph to answer a question, refer to that graph in your answer!
Question 1. What are the minimum and maximum petal widths of flowers in the iris
dataset?
Answer: I used favstats()
to calculate some descriptive statistics for petal widths in the iris dataset. As shown in the output below, the minimum petal width was 0.1 cm and the maximum petal width was 2.5 cm.
## min Q1 median Q3 max mean sd n missing
## 0.1 0.3 1.3 1.8 2.5 1.199333 0.7622377 150 0
Consult the Biology guidelines for data presentation document here.
Formatting tables and figures properly takes time and skill. For now, we’re only going to focus on proper figure and table headings.
There are some special options that need to be set in your Markdown document in order to:
These settings will be included in your R Markdown assignment template documents.
In each R chunk that includes code to construct a graph, your chunk options should look like this in the top of the chunk:
{r fig.cap = "Figure caption here", fig.width = 3, fig.height = 4}
There is a tutorial on this here.