+ - 0:00:00
Notes for current slide
Notes for next slide

Literature programming and RMarkdown

Introduction to Data Science (BIOL7800)

https://introdatasci.dlilab.com/

Daijiang Li

LSU

2021/09/15

1 / 6

Literature programming

Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to humans what we want the computer to do.

--- Donald E. Knuth, Literate Programming, 1984

Literature programming weaves text (e.g., documentation, explanation, comments, etc.) in between machine executable code.

Need to compile it to get a final report, not What You See Is What You Get (WYSIWYG, e.g., MS Word)

2 / 6

R Markdown (https://rmarkdown.rstudio.com/)

A powerful tool for combining analysis (in R, Python, Julia, or other programming languages) and reporting into the same document

rmarkdown workflow

YAML

---
title: "Untitled"
author: "Daijiang Li"
date: "8/17/2021"
output: html_document
---
3 / 6

Open RStudio for demonstration

https://github.com/daijiang/phyr_ms

5 / 6

Literature programming

Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to humans what we want the computer to do.

--- Donald E. Knuth, Literate Programming, 1984

Literature programming weaves text (e.g., documentation, explanation, comments, etc.) in between machine executable code.

Need to compile it to get a final report, not What You See Is What You Get (WYSIWYG, e.g., MS Word)

2 / 6
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow