Skip to content

Commit be61d0d

Browse files
authored
Merge pull request #8 from GenomicsAotearoa/revisions_022024
Revisions 022024
2 parents 0a94b65 + 0cb853b commit be61d0d

10 files changed

Lines changed: 1866 additions & 1596 deletions

docs/00-introduction.md

Lines changed: 170 additions & 111 deletions
Large diffs are not rendered by default.

docs/01-r-basics.md

Lines changed: 498 additions & 395 deletions
Large diffs are not rendered by default.

docs/02-data-prelude.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Introduction to the example dataset and file type
22

3-
!!! info
3+
!!! info "Learning outcomes"
44

5-
=== "Keypoints"
5+
=== "Key points"
66

77
- The dataset comes from a real world experiment in *E. coli*.
88
- Publicly available FASTQ files can be downloaded from NCBI SRA.

docs/03-basics-factors-dataframes.md

Lines changed: 620 additions & 592 deletions
Large diffs are not rendered by default.

docs/06-data-visualization.md

Lines changed: 209 additions & 122 deletions
Large diffs are not rendered by default.

docs/07-knitr-markdown.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
!!! info
44

5-
=== "Keypoints"
5+
=== "Key points"
66

77
- Keep reporting and R software together in one document using R
88
Markdown.
@@ -51,14 +51,14 @@ can just re-compile the report and get the new or corrected results
5151
(versus having to reconstruct figures, paste them into a Word document,
5252
and further hand-edit various detailed results).
5353

54-
The key tool for R is [knitr](http://yihui.name/knitr/), which allows
54+
The key tool for R is [`knitr`](http://yihui.name/knitr/), which allows
5555
you to create a document that is a mixture of text and some chunks of
56-
code. When the document is processed by knitr, chunks of R code will be
56+
code. When the document is processed by `knitr`, chunks of R code will be
5757
executed, and graphs or other results inserted.
5858

5959
This sort of idea has been called "literate programming".
6060

61-
knitr allows you to mix basically any sort of text with any sort of
61+
`knitr` allows you to mix basically any sort of text with any sort of
6262
code, but we recommend that you use R Markdown, which mixes Markdown
6363
with R. Markdown is a light-weight mark-up language for creating web
6464
pages.
@@ -68,9 +68,7 @@ pages.
6868
Within R Studio, click File → New File → R Markdown and you'll get a
6969
dialog box like this:
7070

71-
<!-- Need to generate the image.
72-
![images]()
73-
-->
71+
![Alt text](figures/open_new_Rmd.png)
7472

7573
You can stick with the default (HTML output), but give it a title.
7674

@@ -185,7 +183,7 @@ You can make a hyperlink like this:
185183
You can include an image file like this:
186184
`![caption](http://url/for/file)`
187185

188-
You can do subscripts (e.g., F~2~) with `F~2` and superscripts (e.g.,
186+
You can do subscripts (e.g., F~2~) with `F~2~` and superscripts (e.g.,
189187
F^2^) with `F^2^`.
190188

191189
If you know how to write equations in

docs/08-r-help.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
!!! info
44

5-
=== "Keypoints"
5+
=== "Key points"
66

77
- R provides thousands of functions for analyzing data, and provides several way to get help
88
- Using R will mean searching for online help, and there are tips and resources on how to search effectively
@@ -55,10 +55,10 @@ Often, in order to duplicate the issue you are having, someone may need
5555
to see the data you are working with or verify the versions of R or R
5656
packages you are using. The following R functions will help with this:
5757

58-
You can **check the version of R** you are working with using the
59-
`sessionInfo()` function. Actually, it is good to save this information
60-
as part of your notes on any analysis you are doing. When you run the
61-
same script that has worked fine a dozen times before, looking back at
58+
You can **check the version of R** (and any loaded packages) you are working
59+
with using the `sessionInfo()` function. Actually, it is good to save this
60+
information as part of your notes on any analysis you are doing. When you run
61+
the same script that has worked fine a dozen times before, looking back at
6262
these notes will remind you that you upgraded R and forget to check your
6363
script.
6464

@@ -91,12 +91,11 @@ script.
9191
Many times, there may be some issues with your data and the way it is
9292
formatted. In that case, you may want to share that data with someone
9393
else. However, you may not need to share the whole dataset; looking at a
94-
subset of your 50,000 row, 10,000 column dataframe may be TMI (too much
95-
information)! You can take an object you have in memory such as
96-
dataframe (if you don't know what this means yet, we will get to it!)
97-
and save it to a file. In our example we will use the `dput()` function
98-
on the `iris` dataframe which is an example dataset that is installed in
99-
R:
94+
subset of your 50,000 row, 10,000 column data frame may be TMI (too much
95+
information)! You can take an object you have in memory such as a
96+
data frame and save it to a file. In our example we will use the `dput()`
97+
function on the `iris` data frame which is an example dataset that is installed
98+
in R:
10099

101100
!!! r-project "r"
102101

@@ -163,15 +162,15 @@ them here because they come up commonly:
163162
1:101 # generates the sequence of numbers from 1 to 101
164163
```
165164

166-
!!! success "Output"
167-
168-
```
169-
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
170-
[23] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
171-
[45] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
172-
[67] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
173-
[89] 89 90 91 92 93 94 95 96 97 98 99 100 101
174-
```
165+
!!! success "Output"
166+
167+
```
168+
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
169+
[23] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
170+
[45] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
171+
[67] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
172+
[89] 89 90 91 92 93 94 95 96 97 98 99 100 101
173+
```
175174

176175
In the output above, `[89]` indicates that the first value on that line
177176
is the 89th item in your result

docs/appendix/04-bioconductor-vcfr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
!!! info
44

5-
=== "Keypoints"
5+
=== "Keyp oints"
66

77
- Bioconductor is an alternative package repository for bioinformatics packages.
88
- Installing packages from Bioconductor requires a new method, since it is not compatible with the `install.packages()` function used for CRAN.

0 commit comments

Comments
 (0)