Skip to content

Commit b18fcaf

Browse files
authored
Fix typo and enhance code structure discussion
Corrected a missing ::: div for the ::: callout right before ## Makr your script available in the command line
1 parent 48ad06b commit b18fcaf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

episodes/05-code-structure.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ readability, accessibility and reproducibility.
2424
::::::::::::::::::::::::::::::::::::::::::::::::
2525

2626
In the previous episode we have seen some tools and practices that can help up improve readability of our code -
27-
including breaking our code into small, reusable functions that perform one specific task.
27+
including breaking our code into asmall, reusable functions that perform one specific task.
2828
We are going to explore a bit more how using common code structures can improve readability, accessibility and
2929
reusability of our code, and will expand these practices on our (research or code) projects as a whole.
3030

@@ -328,6 +328,8 @@ my_arg <- args[1]
328328
# main block of code
329329
```
330330

331+
:::
332+
331333
## Command-Line Interface to Code
332334

333335
A common way to structure code is to have a command-line interface that allows the passing of various parameters. For example, we can pass the input data file to be read and the output file to be written to as parameters to our script, and avoid hard-coding them. This improves interoperability and reusability of our code, as it can now be run over any data file of the same structure, invoked from the command line terminal, and integrated into other scripts or workflows and pipelines.

0 commit comments

Comments
 (0)