Skip to content

Commit 2d20716

Browse files
committed
Add column to table in model description with code for each parameter #54
1 parent 0bafcc9 commit 2d20716

File tree

3 files changed

+73
-745
lines changed

3 files changed

+73
-745
lines changed

inst/Documentation/ProjectionModel.Rmd

+24-3
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,37 @@ Description=c(#User-specified parameters
103103
"Number of animals of age $a$ at the start of year $y$",
104104
"Number of animals aged 1 and older at the start of year $y$",
105105
"Mortality due to bycatch of animals of age $a$ in year $y$")
106+
Code <- c(#User-specified parameters
107+
"S0",
108+
"S1plus",
109+
"nages",
110+
"lambdaMax",
111+
"AgeMat + 1",
112+
"ConstantF",
113+
# Parameters derived from user-specified parameters
114+
"Fec0",
115+
"fmax",
116+
"K1plus",
117+
"z",
118+
# Derived variables
119+
"--", # need double dash for using in kableExtra
120+
"--",
121+
"--",
122+
"--")
106123
107124
Symbol_definitions <- data.frame(cbind(Symbol,
108-
Description))
125+
Description, Code))
126+
Symbol_definitions$Code <- cell_spec(Symbol_definitions$Code, font_size = 12, extra_css = "font-family:'Monaco', sans-serif;")
127+
109128
knitr::kable(format="html", #html - change to pandoc for ms word
110129
Symbol_definitions,
111130
escape = FALSE) %>%
112131
kable_styling('bordered') %>%
113132
pack_rows('User-specified parameters', 1, 6, label_row_css = "font-style: italic;border-bottom: 1px solid black;") %>%
114-
pack_rows('Parameters derived from user-specified parameters', 7, 10, label_row_css = "font-style: italic;border-bottom: 1px solid black;") %>%
115-
pack_rows('Derived variables', 11, 14, label_row_css = "font-style: italic;border-bottom: 1px solid black;")
133+
pack_rows('Parameters derived from user-specified parameters', 7, 10,
134+
label_row_css = "font-style: italic;border-bottom: 1px solid black;") %>%
135+
pack_rows('Derived variables', 11, 14,
136+
label_row_css = "font-style: italic;border-bottom: 1px solid black;")
116137
```
117138

118139
### Performance measures

inst/Documentation/ProjectionModel.html

-738
This file was deleted.

inst/Documentation/ProjectionModel_en.html

+49-4
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ <h3>Population model</h3>
6161
<th style="text-align:left;">
6262
Description
6363
</th>
64+
<th style="text-align:left;">
65+
Code
66+
</th>
6467
</tr>
6568
</thead>
6669
<tbody>
6770
<tr grouplength="6">
68-
<td colspan="2" style="font-style: italic;border-bottom: 1px solid black;">
71+
<td colspan="3" style="font-style: italic;border-bottom: 1px solid black;">
6972
<strong>User-specified parameters</strong>
7073
</td>
7174
</tr>
@@ -76,6 +79,9 @@ <h3>Population model</h3>
7679
<td style="text-align:left;">
7780
Pup or calf survival
7881
</td>
82+
<td style="text-align:left;">
83+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">S0</span>
84+
</td>
7985
</tr>
8086
<tr>
8187
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -84,6 +90,9 @@ <h3>Population model</h3>
8490
<td style="text-align:left;">
8591
Survival of individuals aged 1+
8692
</td>
93+
<td style="text-align:left;">
94+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">S1plus</span>
95+
</td>
8796
</tr>
8897
<tr>
8998
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -92,6 +101,9 @@ <h3>Population model</h3>
92101
<td style="text-align:left;">
93102
Plus-group age
94103
</td>
104+
<td style="text-align:left;">
105+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">nages</span>
106+
</td>
95107
</tr>
96108
<tr>
97109
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -100,6 +112,9 @@ <h3>Population model</h3>
100112
<td style="text-align:left;">
101113
Maximum steady rate of increase (population growth rate)
102114
</td>
115+
<td style="text-align:left;">
116+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">lambdaMax</span>
117+
</td>
103118
</tr>
104119
<tr>
105120
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -108,6 +123,9 @@ <h3>Population model</h3>
108123
<td style="text-align:left;">
109124
Age at first parturition
110125
</td>
126+
<td style="text-align:left;">
127+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">AgeMat + 1</span>
128+
</td>
111129
</tr>
112130
<tr>
113131
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -116,9 +134,12 @@ <h3>Population model</h3>
116134
<td style="text-align:left;">
117135
Bycatch mortality rate in year <span class="math inline">\(y\)</span> (specified by the user or computed from the user-specified total bycatch mortality)
118136
</td>
137+
<td style="text-align:left;">
138+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">ConstantF</span>
139+
</td>
119140
</tr>
120141
<tr grouplength="4">
121-
<td colspan="2" style="font-style: italic;border-bottom: 1px solid black;">
142+
<td colspan="3" style="font-style: italic;border-bottom: 1px solid black;">
122143
<strong>Parameters derived from user-specified parameters</strong>
123144
</td>
124145
</tr>
@@ -129,6 +150,9 @@ <h3>Population model</h3>
129150
<td style="text-align:left;">
130151
Fecundity (pregnancy rate) at pre-exploitation equilibrium
131152
</td>
153+
<td style="text-align:left;">
154+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">Fec0</span>
155+
</td>
132156
</tr>
133157
<tr>
134158
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -137,6 +161,9 @@ <h3>Population model</h3>
137161
<td style="text-align:left;">
138162
Maximum theoretical fecundity (pregnancy rate)
139163
</td>
164+
<td style="text-align:left;">
165+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">fmax</span>
166+
</td>
140167
</tr>
141168
<tr>
142169
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -145,6 +172,9 @@ <h3>Population model</h3>
145172
<td style="text-align:left;">
146173
Carrying capacity in terms of 1+ component of the population
147174
</td>
175+
<td style="text-align:left;">
176+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">K1plus</span>
177+
</td>
148178
</tr>
149179
<tr>
150180
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -153,9 +183,12 @@ <h3>Population model</h3>
153183
<td style="text-align:left;">
154184
Degree of compensation
155185
</td>
186+
<td style="text-align:left;">
187+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;">z</span>
188+
</td>
156189
</tr>
157190
<tr grouplength="4">
158-
<td colspan="2" style="font-style: italic;border-bottom: 1px solid black;">
191+
<td colspan="3" style="font-style: italic;border-bottom: 1px solid black;">
159192
<strong>Derived variables</strong>
160193
</td>
161194
</tr>
@@ -166,6 +199,9 @@ <h3>Population model</h3>
166199
<td style="text-align:left;">
167200
Number of mature animals of age <span class="math inline">\(a\)</span> at the start of year <span class="math inline">\(y\)</span>
168201
</td>
202+
<td style="text-align:left;">
203+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;"></span>
204+
</td>
169205
</tr>
170206
<tr>
171207
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -174,6 +210,9 @@ <h3>Population model</h3>
174210
<td style="text-align:left;">
175211
Number of animals of age <span class="math inline">\(a\)</span> at the start of year <span class="math inline">\(y\)</span>
176212
</td>
213+
<td style="text-align:left;">
214+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;"></span>
215+
</td>
177216
</tr>
178217
<tr>
179218
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -182,6 +221,9 @@ <h3>Population model</h3>
182221
<td style="text-align:left;">
183222
Number of animals aged 1 and older at the start of year <span class="math inline">\(y\)</span>
184223
</td>
224+
<td style="text-align:left;">
225+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;"></span>
226+
</td>
185227
</tr>
186228
<tr>
187229
<td style="text-align:left;padding-left: 2em;" indentlevel="1">
@@ -190,6 +232,9 @@ <h3>Population model</h3>
190232
<td style="text-align:left;">
191233
Mortality due to bycatch of animals of age <span class="math inline">\(a\)</span> in year <span class="math inline">\(y\)</span>
192234
</td>
235+
<td style="text-align:left;">
236+
<span style=" font-family:&#39;Monaco&#39;, sans-serif;font-size: 12px;"></span>
237+
</td>
193238
</tr>
194239
</tbody>
195240
</table>
@@ -590,4 +635,4 @@ <h4>Compensation</h4>
590635
})();
591636
</script>
592637

593-
</body>
638+
</body>

0 commit comments

Comments
 (0)