-
Notifications
You must be signed in to change notification settings - Fork 41
/
index.Rmd
103 lines (81 loc) · 4.21 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
title: "RMarkdown for Scientists"
author: "Nicholas Tierney"
date: "`r Sys.Date()`"
knit: "bookdown::render_book"
description: "A book created for a 3 hour workshop on rmarkdown"
documentclass: krantz
site: bookdown::bookdown_site
bibliography: [book.bib, packages.bib]
biblio-style: apalike
colorlinks: yes
fontsize: 12pt
monofont: "Source Code Pro"
monofontoptions: "Scale=0.7"
link-citations: yes
url: 'https\://rmd4sci.njtierney.com/'
---
# About this {-}
This is a book on rmarkdown, aimed for scientists. It was initially developed as a 3 hour workshop, but is now developed into a resource that will grow and change over time as a **living book**.
This book aims to teach the following:
- Getting started with your own R Markdown document
- Improve workflow:
- With RStudio projects
- Using keyboard shortcuts
- Export your R Markdown document to PDF, HTML, and Microsoft Word
- Better manage figures and tables
- Reference figures and tables in text so that they dynamically update
- Create captions for figures and tables
- Change the size and type of figures
- Save the figures to disk when creating an R Markdown document
- Work with equations
- Inline and display
- Caption equations
- Reference equations
- Manage bibliographies
- Cite articles in text
- Generate bibliographies
- Change bibliography styles
- Debug and handle common errors with R Markdown
- Next steps in working with rmarkdown - how to extend yourself to other rmarkdown formats
## Why write this as a book?
There are many great books on R Markdown and it's various features, such as ["Rmarkdown: The definitive guide"](https://bookdown.org/yihui/rmarkdown/), ["bookdown: Authoring Books and Technical Documents with R Markdown"](https://bookdown.org/yihui/bookdown/), and ["Dynamic Documents with R and knitr, Second edition"](https://www.crcpress.com/Dynamic-Documents-with-R-and-knitr/Xie/p/book/9781498716963), and Yihui Xie's thesis, ["Dynamic Graphics and Reporting for Statistics"](https://lib.dr.iastate.edu/etd/13518/).
> So why write a book?
Good question. The answer is that writing this as a book provides a way for me to structure the content in the form of a workshop, in a way suitable for learning in a few hours.
## How to use this book
This book was written to provide course materials for a 3 hour course on R Markdown.
We worked through the following sections in the book in 3 hours:
- [Why use R Markdown](why-rmd)
- [Installation](installation)
- [what is RStudio?](rstudio)
- [suggested workflow and hygiene](workflow)
- [how to use R Markdown](using-rmd)
- [using R Markdown with pdf, html, and Word](pdf-html-word)
- [what are some useful keyboard shortcuts](keyboard-shortcuts)
- [Adding captions to tables and figures](figures-tables-captions)
- [Changing figures](changing-figures)
- [Adding mathematics](math)
- [Citing figures and tables](cite-fig-tab-sec)
- [Changing citations and styles](citations-and-styles)
With the remaining sections being used as extra material, or have since been written after the course:
- [Fixing some common problems in R Markdown](common-problems)
- [What are some alternative outputs of R Markdown?](alternative-outputs-and-exts)
- [Where to go next?](next-steps)
- [Suggested references](references)
Course materials can be downloaded by using the following command from the `usethis` package:
```{r use-course, echo = TRUE, eval = FALSE}
usethis::use_course("bit.ly/rmd4sci-materials")
```
## Where has this course been taught?
So far I have taught this rmarkdown for science course at the following locations:
- 2018
- Melbourne, November for SSA Victoria
- 2019
- Melbourne, April, for Monash University
- Canberra, July, for SSA Victoria
- Melbourne, November, for AIMOS2019
- Melbourne, December, for Plant Pathology Conference
- 2020
- Seattle, February, for University of Washington
## Licence
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>.