259-rmarkdown-hw

Homework 5 - R Markdown

PSYC 259: Principles of Data Science

Instructor: John Franchak

Objective

Convert a heavily-commented R script into a more-nicely formatted (and still functional) R Markdown report. In the folder, you will find data-wrangling-example.R. This was an example I used for another class, where I made lots of comments about the data structure, wrote code and comments for the data cleaning/merging, and I also provided the answers for how to do a few EDA things (steps 3A and 3B). I have included an example of roughly what the final report should look like called eda_markdown.html.

Steps

  1. In R Studio, create a new R Markdown document that will output to html.
  2. Copy the comments and code over from data-wrangling-example.R to your new R Markdown file. Turn the text into markdown prose, and put the code into code chunks. Look at the example document to see whether code/results should be shown vs. hidden.
  3. Do this a little bit at a time and periodically knit your document to make sure it's working correctly.
  4. Turn in the final project on Canvas by sharing your Github project link.