You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update Chapter_04.md
Fix exercise & lists in Chapter 4
* Update chapter_02.md
Change link to analysis.R from relative (which downloads the file) to absolute (on GitHub)
* Update chapter_05.md
Change the links to scripts to within repo
Copy file name to clipboardExpand all lines: docs/chapters/chapter_02.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ Now, it is common that the analysis changes direction as you go along, and/or th
57
57
If you feel dissatisfied with this workflow, you will benefit from this training programme. You will be able to adopt a more efficient workflow that not only generates a deliverable with reproducible results, but also keeps track of the versions of the files so there won't be anything like `presentation-final-final-02.pdf`.
58
58
59
59
## 2.3 Literate Programming
60
-
Practically, literate programming (almost) means merging the **.R** and .tex files in the old workflow. Let's start with a snippet of a non-literate-programming R script (you can access the full script [here](../scripts/analysis.R)):
60
+
Practically, literate programming (almost) means merging the **.R** and .tex files in the old workflow. Let's start with a snippet of a non-literate-programming R script (you can access the full script [here](https://github.com/elixir-europe-training/ELIXIR-TrP-LiterateProgrammingR-CodeRep/blob/main/docs/scripts/analysis.R)):
61
61
62
62
```
63
63
cancer_data <- read.csv("data/breast-cancer-wisconsin.csv") # load the data
Copy file name to clipboardExpand all lines: docs/chapters/chapter_05.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,21 +11,21 @@ It is time for a more comprehensive rounding-off exercise to bring it all togeth
11
11
12
12
!!! question "Exercise"
13
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
14
+
Return to our original example of [non-LP script](https://github.com/elixir-europe-training/ELIXIR-TrP-LiterateProgrammingR-CodeRep/blob/main/docs/scripts/analysis.R) and rework it into a full fledged literate programming
15
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
16
17
17
Specifically:
18
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
19
+
1. Obtain the [analysis.R](https://github.com/elixir-europe-training/ELIXIR-TrP-LiterateProgrammingR-CodeRep/blob/main/docs/scripts/analysis.R) script, copy the script into a new empty script in your RStudio environment
20
20
2. Convert the script into a .Qmd or .Rmd document, with explanatory text and code chunks for plain code and plots
21
21
3. Knit your final .Qmd or .Rmd file to a PDF (or HTML) document
22
22
23
23
??? success "Solution"
24
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)
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/elixir-europe-training/ELIXIR-TrP-LiterateProgrammingR-CodeRep/blob/main/docs/scripts/wisconsin.Rmd)
26
26
27
27
<figure>
28
-
<imgsrc="../../assets/images/RtoQmdtoPDF.png"width="600"alt="Image showing path from .R to .Rmd to .pdf"/>
28
+
<imgsrc="../../assets/images/RtoQmdtoPDF.png"width="720"alt="Image showing path from .R to .Rmd to .pdf"/>
29
29
<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>
0 commit comments