-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmanuscript.Rmd
71 lines (49 loc) · 1.43 KB
/
manuscript.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
---
title: "Awesome manuscript about Iris"
author: "`r Sys.info()['user']`"
date: "Compiled on `r date()` by `r Sys.info()['user']`"
output:
bookdown::html_document2:
fig_caption: yes
toc: yes
toc_float: yes
toc_depth: 4
---
```{r setup_chunk, echo = F}
# Set some options
knitr::opts_chunk$set(echo = FALSE,
message = FALSE,
warning = FALSE,
fig.width = 5,
fig.height = 3)
# Load some packages
suppressPackageStartupMessages({
library(startR)
library(here)
library(ggplot2)
})
```
# Introduction
In this awesome manuscript, we show that there is a correlation between sepal length and sepal width for three species of *Iris spp.*. The three species are:
```{r load_data}
iris <- read.csv(file = here("raw_data", "iris.csv"))
```
# Methods
We fit a linear model with sepal width as a function of sepal length:
$$
SW = mSL + b
$$
# Results
Figure \@ref(fig:plot) shows that larger petals are lighter.
```{r plot, fig.cap = "Relationship between sepal width (gr) and sepal length (cm) for three *Iris spp*."}
ggplot(data = iris,
mapping = aes(x = Sepal.Length, y = Sepal.Width)) +
geom_point(mapping = aes(color = Species)) +
geom_smooth(method = "lm") +
ggtheme_plot() +
labs(x = "Sepal Length (cm)",
y = "Sepal Width (gr)") +
scale_color_brewer(palette = "Set1")
```
# So what?
Yeah, that's about it.