-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path03-create-protocol.Rmd
More file actions
56 lines (42 loc) · 1.56 KB
/
03-create-protocol.Rmd
File metadata and controls
56 lines (42 loc) · 1.56 KB
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
# | Create a Protocol
<font size="1">**Created by:** Caitlin Casar on 2019-10-16 </br>
**Last updated:** 2019-10-16 </font>
Wanna share a cool protocol with your lab mates in this bookdown document? Follow this guide to learn how!
First, you'll need to clone this repository using Git in your terminal.
```{bash, eval=FALSE}
#change directories to a desirable location
cd ~/Desktop
git clone https://github.com/OsburnLab/Protocols
```
Next, open the bookdown-demo.Rproj file in RStudio. Then, select File > New File > R Markdown...
Give this file a name in the format 'number-name.Rmd', where number is in sequential order with the other .Rmd files.
Add an H1 element chapter title to the file.
```{r, eval=FALSE}
# | Chapter Title
```
Next, add some paragraph content below this.
```{r, eval=FALSE}
# | Chapter Title
Here is some paragraph content.
```
To add a code chunk, equations, or figures, check out this [link](https://bookdown.org/yihui/bookdown/components.html).
When you're done editing the R markdown file, render the book.
```{r, eval=FALSE}
bookdown::render_book("index.rmd", "bookdown::gitbook")
```
Now it's time to update your changes online!
```{bash, eval=FALSE}
#change directories to the protocols folder
cd ~/Desktop/Protocols
#add all new files you created
git add.
#commit all of your changes and add a short description about your update
git commit -a -m "short description here"
#push your changes to the github server
git push
#update the rendered html file on the github-hosted page
cd _book
git add .
git commit -a -m "short description here"
git push
```