Skip to content

Commit 914055a

Browse files
authored
Merge pull request #109 from elixir-europe-training/saad-patch-2
Saad patch 2
2 parents f5f8fab + 4829371 commit 914055a

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

docs/chapters/chapter_05.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,31 @@ Now that you have been introduced to:
44

55
1. The importance of literate programming (LP)
66
2. Using markdown to narrate your code
7-
3. Using Quarto to knit your code and narrative into a single LP document
7+
3. Using Quarto to knit your code and narrative into a single LP-compliant document
88

9+
It is time for a more comprehensive rounding-off exercise to bring it all together.
910

10-
It is time to back to our original script (#81: do we need to introduce this earlier?) and rework it into a full fledged literate programming document by applying our knowledge of markdown and quarto
11-
to transform the original script into an LP HTML or PDF document (Fig. 5.1).
11+
12+
!!! question "Exercise"
13+
14+
Return to our original example of [non-LP script](https://github.com/clement-lee/coderep/blob/master/wisconsin.R) (#81: do we need to introduce this in chapter?) and rework it into a full fledged literate programming
15+
document by applying uour knowledge of markdown and quarto to transform the original script into an LP HTML or PDF document (Fig. 5.1).
16+
17+
Specifically:
18+
19+
1. Obtain the [Wisconsin.R](https://github.com/clement-lee/coderep/blob/master/wisconsin.R) script, copy the script into a new empty script in your RStudio environment
20+
2. Convert the script into a .Qmd or .Rmd document, with explanatory text and code chunks for plain code and plots
21+
3. Knit your final .Qmd or .Rmd file to a PDF (or HTML) document
22+
23+
??? success "Solution"
24+
25+
There are no right or wrong answers here but certain solutions will definitely be better than others. if you get stuck or need inspiration check out one possible solution [here](https://github.com/clement-lee/coderep/blob/master/wisconsin.Rmd)
1226

1327
<figure>
1428
<img src="../../assets/images/RtoQmdtoPDF.png" width="600" alt="Image showing path from .R to .Rmd to .pdf"/>
1529
<figcaption> Figure 5.1 Going from the script (Winconsin.R) to a Qmd (or Rmd) file that can be knitted into a LP PDF or similar LP document. </figcaption>
1630
</figure>
1731

1832

19-
To complete this rounding off activity, you need to:
20-
1. Obtain the [Wisconsin.R](https://github.com/clement-lee/coderep/blob/master/wisconsin.R) script, copy the script into a new empty script in your RStudio environment
21-
2. Convert the script into a .Qmd or .Rmd document, complete with explanatory narrative and appropriate code chunks for plain code and plots
22-
3. Knit your final .Qmd or .Rmd file to a PDF (or HTML) document and marvel and your wonderful LP-ified verison os the Wisconsin.R script
2333

24-
There are no right or wrong answers here but certain solutions will definitely be better than others. if you get stuck or need inspiration check out one possible solution [here](https://github.com/clement-lee/coderep/blob/master/wisconsin.Rmd)
34+

0 commit comments

Comments
 (0)