class: center, middle, inverse, title-slide .title[ # Literature programming and RMarkdown ] .subtitle[ ## Introduction to Data Science (BIOL7800)
https://introdatasci.dlilab.com/
] .author[ ### Daijiang Li ] .institute[ ### LSU ] .date[ ### 2021/09/15 ] --- # Literature programming .font200[ > 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. > > .right[--- Donald E. Knuth, Literate Programming, 1984] ] .font150[ 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) ] --- # 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](https://d33wubrfki0l68.cloudfront.net/61d189fd9cdf955058415d3e1b28dd60e1bd7c9b/9791d/images/rmarkdownflow.png) .font150[[YAML](https://en.wikipedia.org/wiki/YAML)] ```yaml --- title: "Untitled" author: "Daijiang Li" date: "8/17/2021" output: html_document --- ``` --- class: middle, center, inverse [.font300[Rmarkdown reference]](https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf) --- class: center, middle # Open RStudio for demonstration ### https://github.com/daijiang/phyr_ms --- # Reference books ## [R Markdown: The Definitive Guide](https://bookdown.org/yihui/rmarkdown/) ## [R Markdown Cookbook](https://bookdown.org/yihui/rmarkdown-cookbook/)