-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRmdtemplate.Rmd
138 lines (104 loc) · 3.44 KB
/
Rmdtemplate.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
title: "«Title goes here»"
author: "[Vijay Lulla](https://vlulla.github.io/)"
date: "`r strftime(Sys.Date(), format='%Y.%m.%d')`"
output:
html_document:
number_sections: true
fig_caption: true
code_folding: hide
pdf_document:
keep_tex: false
number_sections: true
word_document:
fig_caption: true
documentclass: scrartcl
fontfamilyoptions:
- osf
- p
fontsize: 11pt
microtypeoptions:
- final
- tracking=true
- kerning=true
- factor=1100
- stretch=10
- shrink=10
toc: true
lot: true
lof: true
urlcolor: "blue"
geometry: "margin=1in"
bibliography: "mybibliography.bib"
csl: "apa.csl"
---
```{r, label="global_options", echo=FALSE, include=FALSE}
knitr::opts_knit$set(progress=FALSE, verbose=TRUE)
knitr::opts_chunk$set(echo=FALSE, collapse=TRUE, message=FALSE, warning=FALSE,
dpi=150, fig.width=8, fig.height=6, fig.path="figs/")
```
# Introduction {#intro}
Write your introduction here!
It is usually multiple paragraphs.
# Literature Review (or background) {#background}
Write your background/literature review here! You'll need to include citations
in your report. Here's how to do citation [@bogar_green_space_2016]. And,
@farris_creation_2009 is the way to cite inline!
# Data and methods {#data-and-methods}
Since this is a report containing R snippets it will include stuff for R code
along with the descriptions of the data that you need. Please also include
where you got the data from!
## Libraries {#libraries}
```{r, echo=TRUE, label="libraries", message=FALSE}
library(data.table)
library(magrittr)
library(sf)
library(raster)
library(ggplot2)
```
## Data Description {#data-description}
More description of the data if required.
# Results {#results}
Discuss your results here. Instead of describing the tables and/or figures try
to explain how to interpret what we're seeing in the tables, figures, and
charts. Try to assign a label to at least your plot generating code chunks
since the generated file names in the `fig.path` dir (set in the
`global_options` above) will be named using this label.
```{r, label="mpg_vs_drat", fig.cap="My first figure"}
with(mtcars, plot(mpg, drat, xlab="Miles/gallon", ylab="Rear axle drag ratio",
pch=3))
```
# Discussions {#discussion}
Discuss anything that doesn't fit anywhere else!
Here are some miscellaneous notes:
<https://www.google.com> link directly!
[Google](https://www.google.com) link with separate content for link and href!
To show a code block indent by **four spaces**. Let's see if it works
randstr <- function(length=10) {
paste0(sample(c(letters, LETTERS), length, replace=TRUE), collapse="")
}
set.seed(1234L)
randstr()
Let's see if this actually works!
```{r, echo=TRUE}
randstr <- function(length=10) {
paste0(sample(c(letters, LETTERS), length, replace=TRUE), collapse="")
}
set.seed(1234L)
randstr()
```
To include a list just create a correctly aligned bullet-list like so:
* item 1
* item 2
* **bold item 3**
* $3 \times 2 + 5 =$ `r 3 * 2 + 5`
And here's an example of block quote:
> I returned and saw under the sun, that the race is not to the swift, nor the
> battle to the strong, neither yet bread to the wise, nor yet riches to men of
> understanding, nor yet favour to men of skill; but time and chance happenth to
> them all.
>
> --- In George Orwell's _Politics and the English Language_
> [Link](http://www.orwell.ru/library/essays/politics/english/e_polit)
The end!
# References {#references}