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
Copy file name to clipboardExpand all lines: contributing/contributing.ipynb
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@
67
67
":figclass: align-center\n",
68
68
":align: center\n",
69
69
"\n",
70
-
"Example Github Issue Button on the CfRR Website\n",
70
+
"A flowchart depicting an \"Agile Software Development Methodology.\" The process starts with \"Requirements Gathering,\" leads to \"Design,\" then a cyclical \"Implementation\" and \"Testing\" phase, with a feedback loop from \"Testing\" back to \"Design\" for \"review progress & reflect on requirements.\" Finally, the process moves to \"Deployment\" and \"Maintenance\" in a linear fashion.\n",
71
71
"```\n",
72
72
"\n",
73
73
"Once you have clicked the button, a new tab will open taking you into a ready-made GitHub Issue form that you can then add content to explain the issue in more depth. The button will automatically populate the title with the page that the issue is on - please leave that in the title as it makes it easier for whoever fixes the issue to find the issue being discussed. \n",
@@ -92,7 +92,7 @@
92
92
":figclass: align-center\n",
93
93
":align: center\n",
94
94
"\n",
95
-
"Example Filled Out GitHub Issue Form \n",
95
+
"A screenshot of a GitHub webpage focusing on an issue titled \"Issue on page /contributing.html Provide example issues that can be fixed within the highlighting issues section of the website. #22\". The issue, which is closed, displays comments from user \"berrli\" outlining the purpose of the issue and providing a detailed numbered list of various types of errors that could be included as examples. The right sidebar shows issue details like assignees, labels (\"provide_examples\" is present), projects, milestone, and notification options.\n",
96
96
"```\n",
97
97
"\n",
98
98
"### Making Changes\n",
@@ -127,7 +127,7 @@
127
127
":figclass: align-center\n",
128
128
":align: center\n",
129
129
"\n",
130
-
"Example Pull Request Banner\n",
130
+
"A screenshot of a GitHub page showing a banner at the top. The banner displays the repository name \"CfRR_Courses_Contribution_Tutorial\" (marked as \"Public\"), which is forked from \"coding-for-reproducible-research/CfRR_Courses.\" Below this, a yellow box highlights that the \"contribution_tutorial_changes\" branch \"had recent pushes 2 seconds ago\" and offers a green button to \"Compare & pull request.\"\n",
131
131
"```\n",
132
132
"\n",
133
133
"##### Pull Request Form\n",
@@ -138,7 +138,7 @@
138
138
":figclass: align-center\n",
139
139
":align: center\n",
140
140
"\n",
141
-
"Example Pull Request Submission Form \n",
141
+
"A screenshot of a GitHub webpage displaying a form to \"Open a pull request.\" The form specifies the base repository (\"coding-for-reproducible-research/...\") and the head repository (\"berrli/CfRR_Courses_Contribution_Tutorial\") with their respective branches. A green message \"Able to merge. These branches can be automatically merged.\" is displayed. The form allows for adding a title, such as \"Small changes to the contribution markdown file,\" and a description with rich text editing options. Below the description, an option \"Allow edits by maintainers\" is checked, and a \"Create pull request\" button is present. On the right, sections for \"Reviewers,\"\"Assignees,\"\"Labels,\"\"Projects,\" and \"Milestone\" are visible.\n",

Copy file name to clipboardExpand all lines: individual_modules/Introduction_to_Markdown_in_R/Processing_RMarkdown_Files.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
@@ -24,7 +24,7 @@ This will automatically produce the output format type as defined in the YAML he
24
24
25
25
RStudio offers an alternative, user-friendly functionality for rendering R Markdown files, known as **knitting**. Strictly speaking the knitting process operates programatically, but does so under the hood, enabling the user to complete the rendering process simply by clicking buttons.
26
26
27
-
Knitting a `.Rmd` file in RStudio can be performed by clicking the  button. Clicking directly on the blue ball of wool will automatically render the output format type as defined in the YAML header of the R Markdown file. Nevertheless, clicking on the drop-down arrow part of the button will bring up alternative output format options should they be desired.
27
+
Knitting a `.Rmd` file in RStudio can be performed by clicking the  button. Clicking directly on the blue ball of wool will automatically render the output format type as defined in the YAML header of the R Markdown file. Nevertheless, clicking on the drop-down arrow part of the button will bring up alternative output format options should they be desired.
Copy file name to clipboardExpand all lines: individual_modules/Introduction_to_Markdown_in_R/RMarkdown_Components_Embedded_Code.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,8 @@ The number pi equals `r round(x = pi, digits = 3)` when rounded to three decimal
23
23
24
24
Whenever a `.Rmd` file with in-line code is processed, the code gets evaluated, and the result is displayed in place of the code within the output. For the above example, the resultant HTML output would look like:
A screenshot of a simple HTML document. The title "My html document" is displayed at the top, followed by "John Smith" and the date "2025-05-01". The main content reads: "The number pi equals 3.142 when rounded to three decimal places."](Embedded_Display_Items/inline_code.png)
27
28
28
29
## How are code chunks embedded into an R Markdown document?
29
30
@@ -39,7 +40,9 @@ Here, the R code chunk is initiated by starting a new line with `` ```{r} ``. R
39
40
40
41
- Manually typing the code chunk syntax
41
42
- Using the keyboard shortcut `Ctrl + Alt + I` (or `Cmd + Option + I` on a Mac)
42
-
- Clicking the  button in RStudio and then selecting 
43
+
- Clicking the  button in RStudio and then selecting 
43
46
44
47
By default, when a `.Rmd` file gets processed, code chunks are evaluated and displayed alongside their results in the final output document. This behaviour can, however, be controlled *via* optional arguments definable within the `{r}` part of the code chunk. Some important custom options for code chunks in R Markdown are:
45
48
@@ -64,17 +67,20 @@ print(x)
64
67
65
68
Will display in a HTML output as:
66
69
67
-

70
+
![
71
+
A screenshot of a simple HTML document. The title "My html document" is displayed at the top, followed by "John Smith" and the date "2025-05-01". Below this, there is a grey box containing the R code x <- mean(1:10) and print(x). Underneath this code box, another grey box displays the output of the R code: ## [1] 5.5.](Embedded_Display_Items/evalT_echoT.png)
68
72
69
73
Using `eval = TRUE` and `echo = FALSE` will run the code chunk when the R Markdown file is processed, but only show the result of the code chunk in the final output. For the above example, this would display in a HTML output as:
70
74
71
-

75
+
![A screenshot of a simple HTML document. The title "My html document" is displayed at the top, followed by "John Smith" and the date "2025-05-01". Below this, a single grey box contains the output ## [1] 5.5. The code that generated this output is not visible.](Embedded_Display_Items/evalT_echoF.png)
72
76
73
77
Just having the result of a code chunk in the output but not the code itself is particularly useful when wanting to display figures produced using R code. Nevertheless, it can also be helpful sometimes to display the contents of code chunk in the output but not have it ran when the `.Rmd` file is processed, for example when drafting and debugging code, or showing example code without running it. In which case, the combination of `eval = FALSE` and `echo = TRUE` can be used. For the above example, this would display in a HTML output as:
74
78
75
-

79
+

76
80
77
-
Multiple code chunks can be embedded into a single R Markdown document, and it is good practice to partition your whole code into smaller, sensible code chunks that fit in and round descriptive formatted plain text to improve readability. It is also possible to run code chunks in real time within an R Markdown document itself. For a given code chunk in a `.Rmd` file, clicking  will run all code chunks above it in real time, while clicking  will run that code chunk itself in real time. This is helpful when dynamically trialing and testing code while you write it into the R Markdown document. Note that if a code chunk depends on an output generated by any code chunk above it, the depending code chunk(s) above will need to be ran first.
81
+
Multiple code chunks can be embedded into a single R Markdown document, and it is good practice to partition your whole code into smaller, sensible code chunks that fit in and round descriptive formatted plain text to improve readability. It is also possible to run code chunks in real time within an R Markdown document itself. For a given code chunk in a `.Rmd` file, clicking  will run all code chunks above it in real time, while clicking  will run that code chunk itself in real time. This is helpful when dynamically trialing and testing code while you write it into the R Markdown document. Note that if a code chunk depends on an output generated by any code chunk above it, the depending code chunk(s) above will need to be ran first.
78
84
79
85
## Task
80
86
@@ -88,6 +94,6 @@ Try to implement this new content in your own R Markdown file.

0 commit comments