Name: rr-literate-programming
Owner: Data Carpentry
Description: Repository for lesson materials on Literate Programming
Created: 2015-09-16 17:38:11.0
Updated: 2017-03-31 14:44:17.0
Pushed: 2017-06-30 18:47:31.0
Size: 47817
Language: HTML
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Students will work through activities highlighting the motivation for and value of literate programming as a concept, and as its implementation in RMarkdown
. Through this, students will get introduced to the concepts of executable documentation and automation. Students will also learn about best practices for structuring spreadsheet-type data files, and the importance of documenting all changes one makes to data. Finally, students will be introduced to combining all these ideas to create automated, executable, and self-documenting data quality insurance and control reports.
At the beginning of the session, students should
Rstudio
: Rstudio
layout, running R
commands, and running knitr
.At the end of the session students will be able to
RMarkdown
, knitr
, and virtues of literate programming from the demonstrations in the Intro lesson:
slidesObjective: through hands-on interaction and modification, develop familiarity with RMarkdown
and knitting the output.
Students knit
and modify. Using
countryPick4.Rmd as a template, students learn how to import data, filter to one country, make a plot, write it to file, and comment data choices. Then the activity will illustrate what happens when you knit
:
This section is meant for students to explore the power of writing reports in R
.
Lesson: 01-programatic-modification
Students identify poor and good data formatting practices, and will learn the importance of documenting modifications. This will lead to making modifications in a self-documenting and executable way.
This lesson was first created as a part of the Organization1 lesson at the 1. Reproducible Science Curriculum Hackathon, and was later split out into its own lesson. The corresponding author is Hilmar Lapp (@hlapp). See the commit log for other contributors.
Please post feedback and issues with the lesson on the repository's issue tracker. For instructor questions about teaching this lesson, you can also contact the corresponding author directly.
R
package. The data-raw sub-directory reveals the journey from Gapminder.org's Excel workbooks to increasingly clean and tidy data.ToTsv <- system.file("gapminder.tsv", package = "gapminder")
{: .r}