-
Notifications
You must be signed in to change notification settings - Fork 0
/
remake.yml
140 lines (110 loc) · 3.77 KB
/
remake.yml
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
139
packages:
- plyr
- dplyr
- tidyr
- rstan
- ggplot2
- grid
- cowplot
- reshape2
sources:
- 'R/data_processing.R'
- 'R/models.R'
- 'R/figures.R'
plot_options:
A4_landscape:
width: 11.69
height: 8.27
A4_portrait:
width: 8.27
height: 11.69
med_square:
width: 3.46
height: 3.46
med_rectangle:
width: 3.46
height: 2.46
wide_rectangle:
width: 6
height: 4
long_rectangle:
width: 3.46
height: 4.46
targets:
all:
depends:
- export_model_fits
- export_processed_data
- figures
export_processed_data:
depends:
- processed_data/processed_pcq_data.rds
- processed_data/processed_growth_data.rds
export_model_fits:
depends:
- models/density_model.rds
- models/seedling_growth_model.rds
- models/sapling_growth_model.rds
figures:
depends:
- figures/density_coefficient_plot.pdf
- figures/density_predictions.pdf
- figures/density_stds.pdf
- figures/obs_ht_growth.pdf
- figures/growth_coefficient_plot.pdf
- figures/growth_stds.pdf
#------------- Clean data ---------------------------
processed_pcq_data:
command: process_pcq_data("data/ash_pcq.csv")
cleanup_level: purge
check: exists
processed_growth_data:
command: process_growth_data("data/ash_growth.csv")
cleanup_level: purge
check: exists
#------------- Export processed data ---------------------
processed_data/processed_pcq_data.rds:
command: saveRDS(processed_pcq_data, target_name)
cleanup_level: purge
processed_data/processed_growth_data.rds:
command: saveRDS(processed_growth_data, target_name)
cleanup_level: purge
#------------- Run stan models ---------------------------
density_model:
command: run_density_model(processed_pcq_data,I(221))
cleanup_level: purge
seedling_growth_model:
command: run_growth_model(processed_growth_data,I(FALSE), I(1), I(130))
cleanup_level: purge
sapling_growth_model:
command: run_growth_model(processed_growth_data,I(TRUE), I(30), I(130))
cleanup_level: purge
#------------- Export stan models ---------------------------
models/density_model.rds:
command: saveRDS(density_model, target_name)
cleanup_level: purge
models/seedling_growth_model.rds:
command: saveRDS(seedling_growth_model, target_name)
cleanup_level: purge
models/sapling_growth_model.rds:
command: saveRDS(sapling_growth_model, target_name)
cleanup_level: purge
#------------- make figures ---------------------------
figures/density_coefficient_plot.pdf:
command: coefficient_plot(density_model, I(c("mu_log_site","log_b_boundary_position")), I(c("Mean intercept","Position")), I("Estimated log coefficient"))
plot: med_square
figures/density_stds.pdf:
command: coefficient_plot(density_model, I(c("sigma_log_site","sigma_log_transect","sigma_log_point","sigma_log_obs")), I(c("Site","Transect","Point","Observation")), I("Estimated residual std"))
plot: med_square
figures/density_predictions.pdf:
command: density_multipanel(density_model)
plot: long_rectangle
figures/obs_ht_growth.pdf:
command: plot_ht_obs(processed_growth_data)
plot: wide_rectangle
figures/growth_coefficient_plot.pdf:
command: multi_panel_growth_coefficients(seedling_growth_model, sapling_growth_model, I("alpha"), I(c("50m below","Timberline","100m above")), I("Mean estimated logistic growth parameter (R)"))
plot: long_rectangle
figures/growth_stds.pdf:
command: multi_panel_growth_coefficients(seedling_growth_model,sapling_growth_model, I(c("sigma_transect","sigma_ind","sigma_obs")), I(c("Transect","Individual","Observation")), I("Estimated residual std"))
plot: A4_landscape