-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposterdown_land01.Rmd
113 lines (91 loc) · 4.43 KB
/
posterdown_land01.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
---
title: A Better Reproducible Poster Title
author:
- name: Brent Thorne
affil: 1
twitter: brentthorne18
email: [email protected]
orcid: 0000-0002-1099-3857
main: true
affiliation:
- num: 1
address: Department of Earth Sceicnes, Brock University
main_findings:
- "Make **better posters** with RMarkdown + **posterdown**."
- '{.main_pic}'
logoleft_name: '{.main-img-left}'
logoright_name: '{.main-img-right}'
output:
posterdown::posterdown_betterland:
self_contained: false
pandoc_args: --mathjax
highlight: haddock
number_sections: false
link-citations: true
bibliography: packages.bib
---
```{r, include=FALSE}
knitr::opts_chunk$set(results = 'asis',
echo = FALSE,
warning = FALSE,
tidy = FALSE,
message = FALSE,
fig.align = 'center',
out.width = "100%")
options(knitr.table.format = "html")
```
```{r myplot, include=FALSE}
svg('myplot.svg')
plot(iris$Sepal.Length, iris$Sepal.Width)
dev.off()
```
# Introduction
This is the `posterdown_betterland` template for the {posterdown} package! I was inspired by the twitter thread of [Mike Morrison](https://mobile.twitter.com/mikemorrison/status/1110191245035479041) and wanted to apply the `#betterposter` concept to the reproducible (yet simple to use) functionality of the {posterdown} package [@R-posterdown]. If you're not an R user don't sweat as you do **NOT** need to use it at all! Feel free to use only the Markdown functionality of this package :)
```{r, include=FALSE}
knitr::write_bib(c('posterdown', 'rmarkdown','pagedown'), 'packages.bib')
```
## Objectives
1. Pick a template layout.
2. Write/ create your poster content distraction free.
3. Let posterdown do its thing!
# Methods
I will show here how to include poster elements that may be useful, such as an equation using mathjax:
$$
E = mc^2
$$
To reference a citation you can add your `.bib` file to the working directory and name it in the YAML metadata or generate an automated one as done here, then you only need to reference the label value in the `.bib` file. For example this package is built on top of the wonderful {pagedown} package and I will cite it at the end of this sentance using this in the rmd `[@R-pagedown]` [@R-pagedown].
To get a better understanding of how to include features like these please refer to the {posterdown} [wiki](https://github.com/posterdown/wiki).
**_Now on to the results!_**
<br>
# Results
Here you may have some figures to show off, bellow I have made a scatterplot with the infamous Iris dataset and I can even reference to the figure automatically like this, `Figure \@ref(fig:irisfigure)`, Figure \@ref(fig:irisfigure).
```{r, irisfigure, fig.cap='Here is a caption for the figure. This can be added by using the "fig.cap" option in the r code chunk options, see this [link](https://yihui.name/knitr/options/#plots) from the legend himself, [Yihui Xie](https://twitter.com/xieyihui).', out.width="80%"}
par(mar=c(2,2,0,1))
plot(x = iris$Sepal.Length, y = iris$Sepal.Width,
col = iris$Species, pch = 19, xlab = "Sepal Length",
ylab = "Sepal Width")
```
Maybe you want to show off some of that fancy code you spent so much time on to make that figure, well you can do that too! Just use the `echo=TRUE` option in the r code chunk options, Figure \@ref(fig:myprettycode)!
```{r myprettycode, echo=FALSE,collapse=TRUE, fig.cap='Boxplots, so hot right now!', fig.height=3.5, out.width="80%"}
#trim whitespace
par(mar=c(2,2,0,0))
#plot boxplots
boxplot(iris$Sepal.Width~iris$Species,
col = "#008080",
border = "#0b4545",
ylab = "Sepal Width (cm)",
xlab = "Species")
```
How about a neat table of data? See, Table \@ref(tab:iristable):
```{r, iristable}
knitr::kable(
iris[1:8,1:5], format = "html",
caption = "A table made with the **knitr::kable** function.",
align = "c", col.names = c("Sepal <br> Length",
"Sepal <br> Width",
"Petal <br> Length",
"Petal <br> Width",
"Species"),
escape = FALSE)
```
# References