Chapter 5 Reproducable analysis

  • So far, we have been using R scripts to write the code. If reading data from your computer, R scripts require the user to set a working directory (this can be done by going to session- on the R menu, clucking set working directory, then choose directory). The essence of the working directory is to point R to the folder where it should read data from, and write data to (if writing from R to your computer).
  • R script only supports the writing of code, or comments.
  • An improved R script which allows a user to write script and weave together with narrative text to produce output in html, word or PDF format has been developed. This improved script is called an R Markdown
  • R Markdown scripts may be used to create a document, report, presentations or dashboards.
  • If you are interested in using R markdown, kindly use this link for the quick tutorial [https://rmarkdown.rstudio.com/lesson-1.html].