-
Notifications
You must be signed in to change notification settings - Fork 0
/
eta_summary.Rmd
108 lines (90 loc) · 3.11 KB
/
eta_summary.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
---
title: "Heliconia ETA"
date: "updated: `r Sys.Date()`"
header-includes:
- \AtBeginDocument{\let\maketitle\relax} # this removes default title section
- \usepackage[default]{sourcesanspro}
- \usepackage{fancyhdr} # modify header into left, center, right
- \pagestyle{fancy} # cues the use of fancy headers
- \fancyfoot{} # cues the use of fancy footer
# month & year on header left
- \fancyhead[L]{Heliconia ETA}
# name and page on header right
- \fancyhead[R]{p. \thepage}
- \fancyfoot[R]{Last update `r format(Sys.time(), '%d %B %Y')`}
# - \usepackage{setspace}{singlespace} # manipulate line spacing
- \usepackage{parskip} # manipulate indents and spacing before/after paragra phs
- \usepackage{xcolor} # changes colors of text
# to center to top level (#) headings (my name) and change color of font
# more info # https://www.ctan.org/pkg/sectsty
- \usepackage{sectsty} \sectionfont{\centering\color{darkmidnightblue}}
# to center to sub-sub-headings (###) and change color of font
- \usepackage{sectsty} \subsectionfont{\color{darkmidnightblue}}
# http://latexcolor.com/ to choose colors
# define the colors used above with rgb codes
- \definecolor{darkcerulean}{rgb}{0.03, 0.27, 0.49}
- \definecolor{darkmidnightblue}{rgb}{0.0, 0.2, 0.4}
mainfont: SourceSansPro
geometry: margin=1in
fontsize: 12pt
linkcolor: blue
urlcolor: blue
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(kableExtra)
```
```{r data, include=FALSE}
eta_overall<-read_csv("./output/eta_overall.csv") %>%
rename(mean_years=eta_overall)
var_overall<-read_csv("./output/eta_var_overall.csv") %>%
rename(mean_years=eta_var_overall)
#
# eta_overall_long<-pivot_longer(eta_overall,sdlg:shts_7,names_to = "category") %>% rename(mean_years=value)
# var_overall_long<-pivot_longer(eta_overall,sdlg:shts_7,names_to = "category") %>% rename(mean_years=value)
```
<!-- ## H. acuminata_ stage-specific ETA. -->
```{r p_eta, include=FALSE}
p1<-ggplot(eta_overall, aes(x=stage,
y=mean_years
# group=stage, color=stage
)) +
geom_line() +
geom_point()+
# theme_classic()+
theme_light()+
scale_y_continuous(breaks = seq(0,50,10))
# ggtitle("H. acuminata ETA")
```
<!-- ```{r plot1, echo=FALSE} -->
<!-- p1 -->
<!-- ``` -->
<!-- ## H. acuminata_ variance in stage-specific ETA. -->
```{r p_vareta, include=FALSE}
p2<-ggplot(var_overall, aes(x=stage, y=mean_years
# , group=plot, color=plot
)) +
geom_line() +
geom_point()+
# theme_classic()+
theme_light()+
scale_y_continuous(breaks = seq(0,12000,500))
# ggtitle("H. acuminata ETA")
```
<!-- ```{r plot2, echo=FALSE} -->
<!-- p2 -->
<!-- ``` -->
## stage-specific ETA for _H. acuminata_
### _all plots & years combined_
```{r table1, echo=FALSE}
eta_overall<-eta_overall %>%
rename(eta_yrs=mean_years) %>%
relocate(stage,.before=1)
eta<-left_join(eta_overall,var_overall,by="stage") %>%
rename(variance=mean_years) %>%
mutate(eta_yrs=round(eta_yrs,2),
variance=round(variance,2))
kbl(eta)
```