-
Notifications
You must be signed in to change notification settings - Fork 0
/
9 - Species stressors.R
504 lines (468 loc) · 58.6 KB
/
9 - Species stressors.R
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
# Supplementary code for Short et al. Part 9 - proportions of medicinal species subject to each stressor
# Monica Short, August 2020
#Load packages
library(gridExtra)
library(ggplot2)
library(fmsb)
#Set working directory
setwd("~/Documents/Short")
getwd()
#Read in data
use.data<- read.csv("./Shortdata.csv", na.strings=c(""," ","NA"))
#filter medicinal use
threatmed <- use.data[which(use.data$useTradeId..30 =="TRUE"),]
threatmed <- threatmed[which(!is.na(threatmed$Y1) | !is.na(threatmed$Y1.1) | !is.na(threatmed$Y1.2) | !is.na(threatmed$Y1.3) |
!is.na(threatmed$Y2) | !is.na(threatmed$Y2.1) | !is.na(threatmed$Y2.1.1) | !is.na(threatmed$Y2.1.2) | !is.na(threatmed$Y2.1.3) | !is.na(threatmed$Y2.1.4) |
!is.na(threatmed$Y2.2) | !is.na(threatmed$Y2.2.1) | !is.na(threatmed$Y2.2.2) | !is.na(threatmed$Y2.2.3) |
!is.na(threatmed$Y2.3) | !is.na(threatmed$Y2.3.1) | !is.na(threatmed$Y2.3.2) | !is.na(threatmed$Y2.3.3) | !is.na(threatmed$Y2.3.4) |
!is.na(threatmed$Y2.4) | !is.na(threatmed$Y2.4.1) | !is.na(threatmed$Y2.4.2) | !is.na(threatmed$Y2.4.3) |
!is.na(threatmed$Y3) | !is.na(threatmed$Y3.1) | !is.na(threatmed$Y3.2) | !is.na(threatmed$Y3.3) |
!is.na(threatmed$Y4) | !is.na(threatmed$Y4.1) | !is.na(threatmed$Y4.2) | !is.na(threatmed$Y4.3) | !is.na(threatmed$Y4.4) |
!is.na(threatmed$Y5) | !is.na(threatmed$Y5.1) | !is.na(threatmed$Y5.1.1) | !is.na(threatmed$Y5.1.2) | !is.na(threatmed$Y5.1.3) | !is.na(threatmed$Y5.1.4) |
!is.na(threatmed$Y5.2) | !is.na(threatmed$Y5.2.1) | !is.na(threatmed$Y5.2.2) | !is.na(threatmed$Y5.2.3) | !is.na(threatmed$Y5.2.4) |
!is.na(threatmed$Y5.3) | !is.na(threatmed$Y5.3.1) | !is.na(threatmed$Y5.3.2) | !is.na(threatmed$Y5.3.3) | !is.na(threatmed$Y5.3.4) |
!is.na(threatmed$Y5.4) | !is.na(threatmed$Y5.4.1) | !is.na(threatmed$Y5.4.2) | !is.na(threatmed$Y5.4.3) | !is.na(threatmed$Y5.4.4) | !is.na(threatmed$Y5.4.5) | !is.na(threatmed$Y5.4.6) |
!is.na(threatmed$Y6) | !is.na(threatmed$Y6.1) | !is.na(threatmed$Y6.2) | !is.na(threatmed$Y6.3) |
!is.na(threatmed$Y7) | !is.na(threatmed$Y7.1) | !is.na(threatmed$Y7.1.1) | !is.na(threatmed$Y7.1.2) | !is.na(threatmed$Y7.1.3) |
!is.na(threatmed$Y7.2) | !is.na(threatmed$Y7.2.1) | !is.na(threatmed$Y7.2.2) | !is.na(threatmed$Y7.2.3) | !is.na(threatmed$Y7.2.4) | !is.na(threatmed$Y7.2.5) | !is.na(threatmed$Y7.2.6) | !is.na(threatmed$Y7.2.7) | !is.na(threatmed$Y7.2.8) | !is.na(threatmed$Y7.2.9) | !is.na(threatmed$Y7.2.10) | !is.na(threatmed$Y7.2.11) |
!is.na(threatmed$Y7.3) | !is.na(threatmed$Y8) | !is.na(threatmed$Y8.1) | !is.na(threatmed$Y8.1.1) | !is.na(threatmed$Y8.1.2) |
!is.na(threatmed$Y8.2) | !is.na(threatmed$Y8.2.1) | !is.na(threatmed$Y8.2.2) | !is.na(threatmed$Y8.3) |
!is.na(threatmed$Y8.4) | !is.na(threatmed$Y8.4.1) | !is.na(threatmed$Y8.4.2) |
!is.na(threatmed$Y8.5) | !is.na(threatmed$Y8.5.1) | !is.na(threatmed$Y8.5.2) |
!is.na(threatmed$Y8.6) | !is.na(threatmed$Y9) | !is.na(threatmed$Y9.1) | !is.na(threatmed$Y9.1.1) | !is.na(threatmed$Y9.1.2) | !is.na(threatmed$Y9.1.3) |
!is.na(threatmed$Y9.2) | !is.na(threatmed$Y9.2.1) | !is.na(threatmed$Y9.2.2) | !is.na(threatmed$Y9.2.3) |
!is.na(threatmed$Y10) | !is.na(threatmed$Y10.1) | !is.na(threatmed$Y10.2) | !is.na(threatmed$Y10.3) |
!is.na(threatmed$Y11) | !is.na(threatmed$Y11.1) | !is.na(threatmed$Y11.2) | !is.na(threatmed$Y11.3) | !is.na(threatmed$Y11.4) | !is.na(threatmed$Y11.5) |
!is.na(threatmed$Y12) | !is.na(threatmed$Y12.1)),]
#rerun with following line included for stressors of species with medicinal use only
#threatmed <- threatmed[which(threatmed$useTradeId..19 =="FALSE" & threatmed$useTradeId..23 == "FALSE" & threatmed$useTradeId..23 == "FALSE" & threatmed$useTradeId..27 == "FALSE" & threatmed$useTradeId..20 =="FALSE" & threatmed$useTradeId..32 =="FALSE" & threatmed$useTradeId..24 =="FALSE" & threatmed$useTradeId..29 =="FALSE" & threatmed$useTradeId..33 =="FALSE" & threatmed$useTradeId..25 =="FALSE" & threatmed$useTradeId..28 =="FALSE" & threatmed$useTradeId..22 =="FALSE" & threatmed$useTradeId..21 =="FALSE" & threatmed$useTradeId..35 =="FALSE" & threatmed$useTradeId..36 =="FALSE" & threatmed$useTradeId..34 =="FALSE" & threatmed$useTradeId..31 =="FALSE"),]
threatobsnum <- nrow(threatmed)
## -----------------------------------------------------------------------
# Threats by stressors
## -----------------------------------------------------------------------
#Ecosystem Conversion
EcoCon <-subset(threatmed, grepl("1.1", threatmed$Y1.1) | grepl("1.1", threatmed$Y1.2) | grepl("1.1", threatmed$Y1.3) |
grepl("1.1", threatmed$Y2.1) | grepl("1.1", threatmed$Y2.1.1) | grepl("1.1", threatmed$Y2.1.2) | grepl("1.1", threatmed$Y2.1.3) | grepl("1.1", threatmed$Y2.1.4) |
grepl("1.1", threatmed$Y2.2) | grepl("1.1", threatmed$Y2.2.1) | grepl("1.1", threatmed$Y2.2.2) | grepl("1.1", threatmed$Y2.2.3) |
grepl("1.1", threatmed$Y2.3) | grepl("1.1", threatmed$Y2.3.1) | grepl("1.1", threatmed$Y2.3.2) | grepl("1.1", threatmed$Y2.3.3) | grepl("1.1", threatmed$Y2.3.4) |
grepl("1.1", threatmed$Y2.4) | grepl("1.1", threatmed$Y2.4.1) | grepl("1.1", threatmed$Y2.4.2) | grepl("1.1", threatmed$Y2.4.3) |
grepl("1.1", threatmed$Y3.1) | grepl("1.1", threatmed$Y3.2) | grepl("1.1", threatmed$Y3.3) |
grepl("1.1", threatmed$Y4.1) | grepl("1.1", threatmed$Y4.2) | grepl("1.1", threatmed$Y4.3) | grepl("1.1", threatmed$Y4.4) |
grepl("1.1", threatmed$Y5.1) | grepl("1.1", threatmed$Y5.1.1) | grepl("1.1", threatmed$Y5.1.2) | grepl("1.1", threatmed$Y5.1.3) | grepl("1.1", threatmed$Y5.1.4) |
grepl("1.1", threatmed$Y5.2) | grepl("1.1", threatmed$Y5.2.1) | grepl("1.1", threatmed$Y5.2.2) | grepl("1.1", threatmed$Y5.2.3) | grepl("1.1", threatmed$Y5.2.4) |
grepl("1.1", threatmed$Y5.3) | grepl("1.1", threatmed$Y5.3.1) | grepl("1.1", threatmed$Y5.3.2) | grepl("1.1", threatmed$Y5.3.3) | grepl("1.1", threatmed$Y5.3.4) |
grepl("1.1", threatmed$Y5.4) | grepl("1.1", threatmed$Y5.4.1) | grepl("1.1", threatmed$Y5.4.2) | grepl("1.1", threatmed$Y5.4.3) | grepl("1.1", threatmed$Y5.4.4) | grepl("1.1", threatmed$Y5.4.5) | grepl("1.1", threatmed$Y5.4.6) |
grepl("1.1", threatmed$Y6.1) | grepl("1.1", threatmed$Y6.2) | grepl("1.1", threatmed$Y6.3) |
grepl("1.1", threatmed$Y7.1) | grepl("1.1", threatmed$Y7.1.1) | grepl("1.1", threatmed$Y7.1.2) | grepl("1.1", threatmed$Y7.1.3) |
grepl("1.1", threatmed$Y7.2) | grepl("1.1", threatmed$Y7.2.1) | grepl("1.1", threatmed$Y7.2.2) | grepl("1.1", threatmed$Y7.2.3) | grepl("1.1", threatmed$Y7.2.4) | grepl("1.1", threatmed$Y7.2.5) | grepl("1.1", threatmed$Y7.2.6) | grepl("1.1", threatmed$Y7.2.7) | grepl("1.1", threatmed$Y7.2.8) | grepl("1.1", threatmed$Y7.2.9) | grepl("1.1", threatmed$Y7.2.10) | grepl("1.1", threatmed$Y7.2.11) |
grepl("1.1", threatmed$Y7.3) |
grepl("1.1", threatmed$Y8.1) | grepl("1.1", threatmed$Y8.1.1) | grepl("1.1", threatmed$Y8.1.2) |
grepl("1.1", threatmed$Y8.2) | grepl("1.1", threatmed$Y8.2.1) | grepl("1.1", threatmed$Y8.2.2) |
grepl("1.1", threatmed$Y8.3) |
grepl("1.1", threatmed$Y8.4) | grepl("1.1", threatmed$Y8.4.1) | grepl("1.1", threatmed$Y8.4.2) |
grepl("1.1", threatmed$Y8.5) | grepl("1.1", threatmed$Y8.5.1) | grepl("1.1", threatmed$Y8.5.2) |
grepl("1.1", threatmed$Y8.6) |
grepl("1.1", threatmed$Y9.1) | grepl("1.1", threatmed$Y9.1.1) | grepl("1.1", threatmed$Y9.1.2) | grepl("1.1", threatmed$Y9.1.3) |
grepl("1.1", threatmed$Y9.2) | grepl("1.1", threatmed$Y9.2.1) | grepl("1.1", threatmed$Y9.2.2) | grepl("1.1", threatmed$Y9.2.3) |
grepl("1.1", threatmed$Y10.1) | grepl("1.1", threatmed$Y10.2) | grepl("1.1", threatmed$Y10.3) |
grepl("1.1", threatmed$Y11.1) | grepl("1.1", threatmed$Y11.2) | grepl("1.1", threatmed$Y11.3) | grepl("1.1", threatmed$Y11.4) | grepl("1.1", threatmed$Y11.5) |
grepl("1.1", threatmed$Y12.1)
)
EcoConnum <- nrow(EcoCon)
EcoConper <-round((EcoConnum/threatobsnum * 100), dig=2)
#Ecosystem degradation
EcoDeg <-subset(threatmed, grepl("1.2", threatmed$Y1.1) | grepl("1.2", threatmed$Y1.2) | grepl("1.2", threatmed$Y1.3) |
grepl("1.2", threatmed$Y2.1) | grepl("1.2", threatmed$Y2.1.1) | grepl("1.2", threatmed$Y2.1.2) | grepl("1.2", threatmed$Y2.1.3) | grepl("1.2", threatmed$Y2.1.4) |
grepl("1.2", threatmed$Y2.2) | grepl("1.2", threatmed$Y2.2.1) | grepl("1.2", threatmed$Y2.2.2) | grepl("1.2", threatmed$Y2.2.3) |
grepl("1.2", threatmed$Y2.3) | grepl("1.2", threatmed$Y2.3.1) | grepl("1.2", threatmed$Y2.3.2) | grepl("1.2", threatmed$Y2.3.3) | grepl("1.2", threatmed$Y2.3.4) |
grepl("1.2", threatmed$Y2.4) | grepl("1.2", threatmed$Y2.4.1) | grepl("1.2", threatmed$Y2.4.2) | grepl("1.2", threatmed$Y2.4.3) |
grepl("1.2", threatmed$Y3.1) | grepl("1.2", threatmed$Y3.2) | grepl("1.2", threatmed$Y3.3) |
grepl("1.2", threatmed$Y4.1) | grepl("1.2", threatmed$Y4.2) | grepl("1.2", threatmed$Y4.3) | grepl("1.2", threatmed$Y4.4) |
grepl("1.2", threatmed$Y5.1) | grepl("1.2", threatmed$Y5.1.1) | grepl("1.2", threatmed$Y5.1.2) | grepl("1.2", threatmed$Y5.1.3) | grepl("1.2", threatmed$Y5.1.4) |
grepl("1.2", threatmed$Y5.2) | grepl("1.2", threatmed$Y5.2.1) | grepl("1.2", threatmed$Y5.2.2) | grepl("1.2", threatmed$Y5.2.3) | grepl("1.2", threatmed$Y5.2.4) |
grepl("1.2", threatmed$Y5.3) | grepl("1.2", threatmed$Y5.3.1) | grepl("1.2", threatmed$Y5.3.2) | grepl("1.2", threatmed$Y5.3.3) | grepl("1.2", threatmed$Y5.3.4) |
grepl("1.2", threatmed$Y5.4) | grepl("1.2", threatmed$Y5.4.1) | grepl("1.2", threatmed$Y5.4.2) | grepl("1.2", threatmed$Y5.4.3) | grepl("1.2", threatmed$Y5.4.4) | grepl("1.2", threatmed$Y5.4.5) | grepl("1.2", threatmed$Y5.4.6) |
grepl("1.2", threatmed$Y6.1) | grepl("1.2", threatmed$Y6.2) | grepl("1.2", threatmed$Y6.3) |
grepl("1.2", threatmed$Y7.1) | grepl("1.2", threatmed$Y7.1.1) | grepl("1.2", threatmed$Y7.1.2) | grepl("1.2", threatmed$Y7.1.3) |
grepl("1.2", threatmed$Y7.2) | grepl("1.2", threatmed$Y7.2.1) | grepl("1.2", threatmed$Y7.2.2) | grepl("1.2", threatmed$Y7.2.3) | grepl("1.2", threatmed$Y7.2.4) | grepl("1.2", threatmed$Y7.2.5) | grepl("1.2", threatmed$Y7.2.6) | grepl("1.2", threatmed$Y7.2.7) | grepl("1.2", threatmed$Y7.2.8) | grepl("1.2", threatmed$Y7.2.9) | grepl("1.2", threatmed$Y7.2.10) | grepl("1.2", threatmed$Y7.2.11) |
grepl("1.2", threatmed$Y7.3) |
grepl("1.2", threatmed$Y8.1) | grepl("1.2", threatmed$Y8.1.1) | grepl("1.2", threatmed$Y8.1.2) |
grepl("1.2", threatmed$Y8.2) | grepl("1.2", threatmed$Y8.2.1) | grepl("1.2", threatmed$Y8.2.2) |
grepl("1.2", threatmed$Y8.3) |
grepl("1.2", threatmed$Y8.4) | grepl("1.2", threatmed$Y8.4.1) | grepl("1.2", threatmed$Y8.4.2) |
grepl("1.2", threatmed$Y8.5) | grepl("1.2", threatmed$Y8.5.1) | grepl("1.2", threatmed$Y8.5.2) |
grepl("1.2", threatmed$Y8.6) |
grepl("1.2", threatmed$Y9.1) | grepl("1.2", threatmed$Y9.1.1) | grepl("1.2", threatmed$Y9.1.2) | grepl("1.2", threatmed$Y9.1.3) |
grepl("1.2", threatmed$Y9.2) | grepl("1.2", threatmed$Y9.2.1) | grepl("1.2", threatmed$Y9.2.2) | grepl("1.2", threatmed$Y9.2.3) |
grepl("1.2", threatmed$Y10.1) | grepl("1.2", threatmed$Y10.2) | grepl("1.2", threatmed$Y10.3) |
grepl("1.2", threatmed$Y11.1) | grepl("1.2", threatmed$Y11.2) | grepl("1.2", threatmed$Y11.3) | grepl("1.2", threatmed$Y11.4) | grepl("1.2", threatmed$Y11.5) |
grepl("1.2", threatmed$Y12.1)
)
EcoDegnum <- nrow(EcoDeg)
EcoDegper <-round((EcoDegnum/threatobsnum * 100), dig=2)
#Indirect ecosystem effects
IndirEcoEff <-subset(threatmed, grepl("1.3", threatmed$Y1.1) | grepl("1.3", threatmed$Y1.2) | grepl("1.3", threatmed$Y1.3) | grepl("1.3", threatmed$Y2.1) | grepl("1.3", threatmed$Y2.1.1) | grepl("1.3", threatmed$Y2.1.2) | grepl("1.3", threatmed$Y2.1.3) | grepl("1.3", threatmed$Y2.1.4) |
grepl("1.3", threatmed$Y2.2) | grepl("1.3", threatmed$Y2.2.1) | grepl("1.3", threatmed$Y2.2.2) | grepl("1.3", threatmed$Y2.2.3) |
grepl("1.3", threatmed$Y2.3) | grepl("1.3", threatmed$Y2.3.1) | grepl("1.3", threatmed$Y2.3.2) | grepl("1.3", threatmed$Y2.3.3) | grepl("1.3", threatmed$Y2.3.4) |
grepl("1.3", threatmed$Y2.4) | grepl("1.3", threatmed$Y2.4.1) | grepl("1.3", threatmed$Y2.4.2) | grepl("1.3", threatmed$Y2.4.3) |
grepl("1.3", threatmed$Y3.1) | grepl("1.3", threatmed$Y3.2) | grepl("1.3", threatmed$Y3.3) |
grepl("1.3", threatmed$Y4.1) | grepl("1.3", threatmed$Y4.2) | grepl("1.3", threatmed$Y4.3) | grepl("1.3", threatmed$Y4.4) |
grepl("1.3", threatmed$Y5.1) | grepl("1.3", threatmed$Y5.1.1) | grepl("1.3", threatmed$Y5.1.2) | grepl("1.3", threatmed$Y5.1.3) | grepl("1.3", threatmed$Y5.1.4) |
grepl("1.3", threatmed$Y5.2) | grepl("1.3", threatmed$Y5.2.1) | grepl("1.3", threatmed$Y5.2.2) | grepl("1.3", threatmed$Y5.2.3) | grepl("1.3", threatmed$Y5.2.4) |
grepl("1.3", threatmed$Y5.3) | grepl("1.3", threatmed$Y5.3.1) | grepl("1.3", threatmed$Y5.3.2) | grepl("1.3", threatmed$Y5.3.3) | grepl("1.3", threatmed$Y5.3.4) |
grepl("1.3", threatmed$Y5.4) | grepl("1.3", threatmed$Y5.4.1) | grepl("1.3", threatmed$Y5.4.2) | grepl("1.3", threatmed$Y5.4.3) | grepl("1.3", threatmed$Y5.4.4) | grepl("1.3", threatmed$Y5.4.5) | grepl("1.3", threatmed$Y5.4.6) |
grepl("1.3", threatmed$Y6.1) | grepl("1.3", threatmed$Y6.2) | grepl("1.3", threatmed$Y6.3) |
grepl("1.3", threatmed$Y7.1) | grepl("1.3", threatmed$Y7.1.1) | grepl("1.3", threatmed$Y7.1.2) | grepl("1.3", threatmed$Y7.1.3) |
grepl("1.3", threatmed$Y7.2) | grepl("1.3", threatmed$Y7.2.1) | grepl("1.3", threatmed$Y7.2.2) | grepl("1.3", threatmed$Y7.2.3) | grepl("1.3", threatmed$Y7.2.4) | grepl("1.3", threatmed$Y7.2.5) | grepl("1.3", threatmed$Y7.2.6) | grepl("1.3", threatmed$Y7.2.7) | grepl("1.3", threatmed$Y7.2.8) | grepl("1.3", threatmed$Y7.2.9) | grepl("1.3", threatmed$Y7.2.10) | grepl("1.3", threatmed$Y7.2.11) |
grepl("1.3", threatmed$Y7.3) |
grepl("1.3", threatmed$Y8.1) | grepl("1.3", threatmed$Y8.1.1) | grepl("1.3", threatmed$Y8.1.2) |
grepl("1.3", threatmed$Y8.2) | grepl("1.3", threatmed$Y8.2.1) | grepl("1.3", threatmed$Y8.2.2) |
grepl("1.3", threatmed$Y8.3) |
grepl("1.3", threatmed$Y8.4) | grepl("1.3", threatmed$Y8.4.1) | grepl("1.3", threatmed$Y8.4.2) |
grepl("1.3", threatmed$Y8.5) | grepl("1.3", threatmed$Y8.5.1) | grepl("1.3", threatmed$Y8.5.2) |
grepl("1.3", threatmed$Y8.6) |
grepl("1.3", threatmed$Y9.1) | grepl("1.3", threatmed$Y9.1.1) | grepl("1.3", threatmed$Y9.1.2) | grepl("1.3", threatmed$Y9.1.3) |
grepl("1.3", threatmed$Y9.2) | grepl("1.3", threatmed$Y9.2.1) | grepl("1.3", threatmed$Y9.2.2) | grepl("1.3", threatmed$Y9.2.3) |
grepl("1.3", threatmed$Y10.1) | grepl("1.3", threatmed$Y10.2) | grepl("1.3", threatmed$Y10.3) |
grepl("1.3", threatmed$Y11.1) | grepl("1.3", threatmed$Y11.2) | grepl("1.3", threatmed$Y11.3) | grepl("1.3", threatmed$Y11.4) | grepl("1.3", threatmed$Y11.5) |
grepl("1.3", threatmed$Y12.1)
)
IndirEcoEffnum <- nrow(IndirEcoEff)
IndirEcoEffper <-round((IndirEcoEffnum/threatobsnum * 100), dig=2)
#Species mortality
SpecMort <-subset(threatmed, grepl("2.1", threatmed$Y1.1) | grepl("2.1", threatmed$Y1.2) | grepl("2.1", threatmed$Y1.3) |
grepl("2.1", threatmed$Y2.1) | grepl("2.1", threatmed$Y2.1.1) | grepl("2.1", threatmed$Y2.1.2) | grepl("2.1", threatmed$Y2.1.3) | grepl("2.1", threatmed$Y2.1.4) |
grepl("2.1", threatmed$Y2.2) | grepl("2.1", threatmed$Y2.2.1) | grepl("2.1", threatmed$Y2.2.2) | grepl("2.1", threatmed$Y2.2.3) |
grepl("2.1", threatmed$Y2.3) | grepl("2.1", threatmed$Y2.3.1) | grepl("2.1", threatmed$Y2.3.2) | grepl("2.1", threatmed$Y2.3.3) | grepl("2.1", threatmed$Y2.3.4) |
grepl("2.1", threatmed$Y2.4) | grepl("2.1", threatmed$Y2.4.1) | grepl("2.1", threatmed$Y2.4.2) | grepl("2.1", threatmed$Y2.4.3) |
grepl("2.1", threatmed$Y3.1) | grepl("2.1", threatmed$Y3.2) | grepl("2.1", threatmed$Y3.3) |
grepl("2.1", threatmed$Y4.1) | grepl("2.1", threatmed$Y4.2) | grepl("2.1", threatmed$Y4.3) | grepl("2.1", threatmed$Y4.4) |
grepl("2.1", threatmed$Y5.1) | grepl("2.1", threatmed$Y5.1.1) | grepl("2.1", threatmed$Y5.1.2) | grepl("2.1", threatmed$Y5.1.3) | grepl("2.1", threatmed$Y5.1.4) |
grepl("2.1", threatmed$Y5.2) | grepl("2.1", threatmed$Y5.2.1) | grepl("2.1", threatmed$Y5.2.2) | grepl("2.1", threatmed$Y5.2.3) | grepl("2.1", threatmed$Y5.2.4) |
grepl("2.1", threatmed$Y5.3) | grepl("2.1", threatmed$Y5.3.1) | grepl("2.1", threatmed$Y5.3.2) | grepl("2.1", threatmed$Y5.3.3) | grepl("2.1", threatmed$Y5.3.4) |
grepl("2.1", threatmed$Y5.4) | grepl("2.1", threatmed$Y5.4.1) | grepl("2.1", threatmed$Y5.4.2) | grepl("2.1", threatmed$Y5.4.3) | grepl("2.1", threatmed$Y5.4.4) | grepl("2.1", threatmed$Y5.4.5) | grepl("2.1", threatmed$Y5.4.6) |
grepl("2.1", threatmed$Y6.1) | grepl("2.1", threatmed$Y6.2) | grepl("2.1", threatmed$Y6.3) |
grepl("2.1", threatmed$Y7.1) | grepl("2.1", threatmed$Y7.1.1) | grepl("2.1", threatmed$Y7.1.2) | grepl("2.1", threatmed$Y7.1.3) |
grepl("2.1", threatmed$Y7.2) | grepl("2.1", threatmed$Y7.2.1) | grepl("2.1", threatmed$Y7.2.2) | grepl("2.1", threatmed$Y7.2.3) | grepl("2.1", threatmed$Y7.2.4) | grepl("2.1", threatmed$Y7.2.5) | grepl("2.1", threatmed$Y7.2.6) | grepl("2.1", threatmed$Y7.2.7) | grepl("2.1", threatmed$Y7.2.8) | grepl("2.1", threatmed$Y7.2.9) | grepl("2.1", threatmed$Y7.2.10) | grepl("2.1", threatmed$Y7.2.11) |
grepl("2.1", threatmed$Y7.3) |
grepl("2.1", threatmed$Y8.1) | grepl("2.1", threatmed$Y8.1.1) | grepl("2.1", threatmed$Y8.1.2) |
grepl("2.1", threatmed$Y8.2) | grepl("2.1", threatmed$Y8.2.1) | grepl("2.1", threatmed$Y8.2.2) |
grepl("2.1", threatmed$Y8.3) |
grepl("2.1", threatmed$Y8.4) | grepl("2.1", threatmed$Y8.4.1) | grepl("2.1", threatmed$Y8.4.2) |
grepl("2.1", threatmed$Y8.5) | grepl("2.1", threatmed$Y8.5.1) | grepl("2.1", threatmed$Y8.5.2) |
grepl("2.1", threatmed$Y8.6) |
grepl("2.1", threatmed$Y9.1) | grepl("2.1", threatmed$Y9.1.1) | grepl("2.1", threatmed$Y9.1.2) | grepl("2.1", threatmed$Y9.1.3) |
grepl("2.1", threatmed$Y9.2) | grepl("2.1", threatmed$Y9.2.1) | grepl("2.1", threatmed$Y9.2.2) | grepl("2.1", threatmed$Y9.2.3) |
grepl("2.1", threatmed$Y10.1) | grepl("2.1", threatmed$Y10.2) | grepl("2.1", threatmed$Y10.3) |
grepl("2.1", threatmed$Y11.1) | grepl("2.1", threatmed$Y11.2) | grepl("2.1", threatmed$Y11.3) | grepl("2.1", threatmed$Y11.4) | grepl("2.1", threatmed$Y11.5) |
grepl("2.1", threatmed$Y12.1)
)
SpecMortnum <- nrow(SpecMort)
SpecMortper <-round((SpecMortnum/threatobsnum * 100), dig=2)
#Species disturbances
SpecDist <-subset(threatmed, grepl("2.2", threatmed$Y1.1) | grepl("2.2", threatmed$Y1.2) | grepl("2.2", threatmed$Y1.3) |
grepl("2.2", threatmed$Y2.1) | grepl("2.2", threatmed$Y2.1.1) | grepl("2.2", threatmed$Y2.1.2) | grepl("2.2", threatmed$Y2.1.3) | grepl("2.2", threatmed$Y2.1.4) |
grepl("2.2", threatmed$Y2.2) | grepl("2.2", threatmed$Y2.2.1) | grepl("2.2", threatmed$Y2.2.2) | grepl("2.2", threatmed$Y2.2.3) |
grepl("2.2", threatmed$Y2.3) | grepl("2.2", threatmed$Y2.3.1) | grepl("2.2", threatmed$Y2.3.2) | grepl("2.2", threatmed$Y2.3.3) | grepl("2.2", threatmed$Y2.3.4) |
grepl("2.2", threatmed$Y2.4) | grepl("2.2", threatmed$Y2.4.1) | grepl("2.2", threatmed$Y2.4.2) | grepl("2.2", threatmed$Y2.4.3) |
grepl("2.2", threatmed$Y3.1) | grepl("2.2", threatmed$Y3.2) | grepl("2.2", threatmed$Y3.3) |
grepl("2.2", threatmed$Y4.1) | grepl("2.2", threatmed$Y4.2) | grepl("2.2", threatmed$Y4.3) | grepl("2.2", threatmed$Y4.4) |
grepl("2.2", threatmed$Y5.1) | grepl("2.2", threatmed$Y5.1.1) | grepl("2.2", threatmed$Y5.1.2) | grepl("2.2", threatmed$Y5.1.3) | grepl("2.2", threatmed$Y5.1.4) |
grepl("2.2", threatmed$Y5.2) | grepl("2.2", threatmed$Y5.2.1) | grepl("2.2", threatmed$Y5.2.2) | grepl("2.2", threatmed$Y5.2.3) | grepl("2.2", threatmed$Y5.2.4) |
grepl("2.2", threatmed$Y5.3) | grepl("2.2", threatmed$Y5.3.1) | grepl("2.2", threatmed$Y5.3.2) | grepl("2.2", threatmed$Y5.3.3) | grepl("2.2", threatmed$Y5.3.4) |
grepl("2.2", threatmed$Y5.4) | grepl("2.2", threatmed$Y5.4.1) | grepl("2.2", threatmed$Y5.4.2) | grepl("2.2", threatmed$Y5.4.3) | grepl("2.2", threatmed$Y5.4.4) | grepl("2.2", threatmed$Y5.4.5) | grepl("2.2", threatmed$Y5.4.6) |
grepl("2.2", threatmed$Y6.1) | grepl("2.2", threatmed$Y6.2) | grepl("2.2", threatmed$Y6.3) |
grepl("2.2", threatmed$Y7.1) | grepl("2.2", threatmed$Y7.1.1) | grepl("2.2", threatmed$Y7.1.2) | grepl("2.2", threatmed$Y7.1.3) |
grepl("2.2", threatmed$Y7.2) | grepl("2.2", threatmed$Y7.2.1) | grepl("2.2", threatmed$Y7.2.2) | grepl("2.2", threatmed$Y7.2.3) | grepl("2.2", threatmed$Y7.2.4) | grepl("2.2", threatmed$Y7.2.5) | grepl("2.2", threatmed$Y7.2.6) | grepl("2.2", threatmed$Y7.2.7) | grepl("2.2", threatmed$Y7.2.8) | grepl("2.2", threatmed$Y7.2.9) | grepl("2.2", threatmed$Y7.2.10) | grepl("2.2", threatmed$Y7.2.11) |
grepl("2.2", threatmed$Y7.3) |
grepl("2.2", threatmed$Y8.1) | grepl("2.2", threatmed$Y8.1.1) | grepl("2.2", threatmed$Y8.1.2) |
grepl("2.2", threatmed$Y8.2) | grepl("2.2", threatmed$Y8.2.1) | grepl("2.2", threatmed$Y8.2.2) |
grepl("2.2", threatmed$Y8.3) |
grepl("2.2", threatmed$Y8.4) | grepl("2.2", threatmed$Y8.4.1) | grepl("2.2", threatmed$Y8.4.2) |
grepl("2.2", threatmed$Y8.5) | grepl("2.2", threatmed$Y8.5.1) | grepl("2.2", threatmed$Y8.5.2) |
grepl("2.2", threatmed$Y8.6) |
grepl("2.2", threatmed$Y9.1) | grepl("2.2", threatmed$Y9.1.1) | grepl("2.2", threatmed$Y9.1.2) | grepl("2.2", threatmed$Y9.1.3) |
grepl("2.2", threatmed$Y9.2) | grepl("2.2", threatmed$Y9.2.1) | grepl("2.2", threatmed$Y9.2.2) | grepl("2.2", threatmed$Y9.2.3) |
grepl("2.2", threatmed$Y10.1) | grepl("2.2", threatmed$Y10.2) | grepl("2.2", threatmed$Y10.3) |
grepl("2.2", threatmed$Y11.1) | grepl("2.2", threatmed$Y11.2) | grepl("2.2", threatmed$Y11.3) | grepl("2.2", threatmed$Y11.4) | grepl("2.2", threatmed$Y11.5) |
grepl("2.2", threatmed$Y12.1)
)
SpecDistnum <- nrow(SpecDist)
SpecDistper <-round((SpecDistnum/threatobsnum * 100), dig=2)
#Hybridisation
Hybrid <-subset(threatmed, grepl("2.3.1", threatmed$Y1.1) | grepl("2.3.1", threatmed$Y1.2) | grepl("2.3.1", threatmed$Y1.3) |
grepl("2.3.1", threatmed$Y2.1) | grepl("2.3.1", threatmed$Y2.1.1) | grepl("2.3.1", threatmed$Y2.1.2) | grepl("2.3.1", threatmed$Y2.1.3) | grepl("2.3.1", threatmed$Y2.1.4) |
grepl("2.3.1", threatmed$Y2.2) | grepl("2.3.1", threatmed$Y2.2.1) | grepl("2.3.1", threatmed$Y2.2.2) | grepl("2.3.1", threatmed$Y2.2.3) |
grepl("2.3.1", threatmed$Y2.3) | grepl("2.3.1", threatmed$Y2.3.1) | grepl("2.3.1", threatmed$Y2.3.2) | grepl("2.3.1", threatmed$Y2.3.3) | grepl("2.3.1", threatmed$Y2.3.4) |
grepl("2.3.1", threatmed$Y2.4) | grepl("2.3.1", threatmed$Y2.4.1) | grepl("2.3.1", threatmed$Y2.4.2) | grepl("2.3.1", threatmed$Y2.4.3) |
grepl("2.3.1", threatmed$Y3.1) | grepl("2.3.1", threatmed$Y3.2) | grepl("2.3.1", threatmed$Y3.3) |
grepl("2.3.1", threatmed$Y4.1) | grepl("2.3.1", threatmed$Y4.2) | grepl("2.3.1", threatmed$Y4.3) | grepl("2.3.1", threatmed$Y4.4) |
grepl("2.3.1", threatmed$Y5.1) | grepl("2.3.1", threatmed$Y5.1.1) | grepl("2.3.1", threatmed$Y5.1.2) | grepl("2.3.1", threatmed$Y5.1.3) | grepl("2.3.1", threatmed$Y5.1.4) |
grepl("2.3.1", threatmed$Y5.2) | grepl("2.3.1", threatmed$Y5.2.1) | grepl("2.3.1", threatmed$Y5.2.2) | grepl("2.3.1", threatmed$Y5.2.3) | grepl("2.3.1", threatmed$Y5.2.4) |
grepl("2.3.1", threatmed$Y5.3) | grepl("2.3.1", threatmed$Y5.3.1) | grepl("2.3.1", threatmed$Y5.3.2) | grepl("2.3.1", threatmed$Y5.3.3) | grepl("2.3.1", threatmed$Y5.3.4) |
grepl("2.3.1", threatmed$Y5.4) | grepl("2.3.1", threatmed$Y5.4.1) | grepl("2.3.1", threatmed$Y5.4.2) | grepl("2.3.1", threatmed$Y5.4.3) | grepl("2.3.1", threatmed$Y5.4.4) | grepl("2.3.1", threatmed$Y5.4.5) | grepl("2.3.1", threatmed$Y5.4.6) |
grepl("2.3.1", threatmed$Y6.1) | grepl("2.3.1", threatmed$Y6.2) | grepl("2.3.1", threatmed$Y6.3) |
grepl("2.3.1", threatmed$Y7.1) | grepl("2.3.1", threatmed$Y7.1.1) | grepl("2.3.1", threatmed$Y7.1.2) | grepl("2.3.1", threatmed$Y7.1.3) |
grepl("2.3.1", threatmed$Y7.2) | grepl("2.3.1", threatmed$Y7.2.1) | grepl("2.3.1", threatmed$Y7.2.2) | grepl("2.3.1", threatmed$Y7.2.3) | grepl("2.3.1", threatmed$Y7.2.4) | grepl("2.3.1", threatmed$Y7.2.5) | grepl("2.3.1", threatmed$Y7.2.6) | grepl("2.3.1", threatmed$Y7.2.7) | grepl("2.3.1", threatmed$Y7.2.8) | grepl("2.3.1", threatmed$Y7.2.9) | grepl("2.3.1", threatmed$Y7.2.10) | grepl("2.3.1", threatmed$Y7.2.11) |
grepl("2.3.1", threatmed$Y7.3) |
grepl("2.3.1", threatmed$Y8.1) | grepl("2.3.1", threatmed$Y8.1.1) | grepl("2.3.1", threatmed$Y8.1.2) |
grepl("2.3.1", threatmed$Y8.2) | grepl("2.3.1", threatmed$Y8.2.1) | grepl("2.3.1", threatmed$Y8.2.2) |
grepl("2.3.1", threatmed$Y8.3) |
grepl("2.3.1", threatmed$Y8.4) | grepl("2.3.1", threatmed$Y8.4.1) | grepl("2.3.1", threatmed$Y8.4.2) |
grepl("2.3.1", threatmed$Y8.5) | grepl("2.3.1", threatmed$Y8.5.1) | grepl("2.3.1", threatmed$Y8.5.2) |
grepl("2.3.1", threatmed$Y8.6) |
grepl("2.3.1", threatmed$Y9.1) | grepl("2.3.1", threatmed$Y9.1.1) | grepl("2.3.1", threatmed$Y9.1.2) | grepl("2.3.1", threatmed$Y9.1.3) |
grepl("2.3.1", threatmed$Y9.2) | grepl("2.3.1", threatmed$Y9.2.1) | grepl("2.3.1", threatmed$Y9.2.2) | grepl("2.3.1", threatmed$Y9.2.3) |
grepl("2.3.1", threatmed$Y10.1) | grepl("2.3.1", threatmed$Y10.2) | grepl("2.3.1", threatmed$Y10.3) |
grepl("2.3.1", threatmed$Y11.1) | grepl("2.3.1", threatmed$Y11.2) | grepl("2.3.1", threatmed$Y11.3) | grepl("2.3.1", threatmed$Y11.4) | grepl("2.3.1", threatmed$Y11.5) |
grepl("2.3.1", threatmed$Y12.1)
)
Hybridnum <- nrow(Hybrid)
Hybridper <-round((Hybridnum/threatobsnum * 100), dig=2)
#Competition
Comp <-subset(threatmed, grepl("2.3.2", threatmed$Y1.1) | grepl("2.3.2", threatmed$Y1.2) | grepl("2.3.2", threatmed$Y1.3) |
grepl("2.3.2", threatmed$Y2.1) | grepl("2.3.2", threatmed$Y2.1.1) | grepl("2.3.2", threatmed$Y2.1.2) | grepl("2.3.2", threatmed$Y2.1.3) | grepl("2.3.2", threatmed$Y2.1.4) |
grepl("2.3.2", threatmed$Y2.2) | grepl("2.3.2", threatmed$Y2.2.1) | grepl("2.3.2", threatmed$Y2.2.2) | grepl("2.3.2", threatmed$Y2.2.3) |
grepl("2.3.2", threatmed$Y2.3) | grepl("2.3.2", threatmed$Y2.3.1) | grepl("2.3.2", threatmed$Y2.3.2) | grepl("2.3.2", threatmed$Y2.3.3) | grepl("2.3.2", threatmed$Y2.3.4) |
grepl("2.3.2", threatmed$Y2.4) | grepl("2.3.2", threatmed$Y2.4.1) | grepl("2.3.2", threatmed$Y2.4.2) | grepl("2.3.2", threatmed$Y2.4.3) |
grepl("2.3.2", threatmed$Y3.1) | grepl("2.3.2", threatmed$Y3.2) | grepl("2.3.2", threatmed$Y3.3) |
grepl("2.3.2", threatmed$Y4.1) | grepl("2.3.2", threatmed$Y4.2) | grepl("2.3.2", threatmed$Y4.3) | grepl("2.3.2", threatmed$Y4.4) |
grepl("2.3.2", threatmed$Y5.1) | grepl("2.3.2", threatmed$Y5.1.1) | grepl("2.3.2", threatmed$Y5.1.2) | grepl("2.3.2", threatmed$Y5.1.3) | grepl("2.3.2", threatmed$Y5.1.4) |
grepl("2.3.2", threatmed$Y5.2) | grepl("2.3.2", threatmed$Y5.2.1) | grepl("2.3.2", threatmed$Y5.2.2) | grepl("2.3.2", threatmed$Y5.2.3) | grepl("2.3.2", threatmed$Y5.2.4) |
grepl("2.3.2", threatmed$Y5.3) | grepl("2.3.2", threatmed$Y5.3.1) | grepl("2.3.2", threatmed$Y5.3.2) | grepl("2.3.2", threatmed$Y5.3.3) | grepl("2.3.2", threatmed$Y5.3.4) |
grepl("2.3.2", threatmed$Y5.4) | grepl("2.3.2", threatmed$Y5.4.1) | grepl("2.3.2", threatmed$Y5.4.2) | grepl("2.3.2", threatmed$Y5.4.3) | grepl("2.3.2", threatmed$Y5.4.4) | grepl("2.3.2", threatmed$Y5.4.5) | grepl("2.3.2", threatmed$Y5.4.6) |
grepl("2.3.2", threatmed$Y6.1) | grepl("2.3.2", threatmed$Y6.2) | grepl("2.3.2", threatmed$Y6.3) |
grepl("2.3.2", threatmed$Y7.1) | grepl("2.3.2", threatmed$Y7.1.1) | grepl("2.3.2", threatmed$Y7.1.2) | grepl("2.3.2", threatmed$Y7.1.3) |
grepl("2.3.2", threatmed$Y7.2) | grepl("2.3.2", threatmed$Y7.2.1) | grepl("2.3.2", threatmed$Y7.2.2) | grepl("2.3.2", threatmed$Y7.2.3) | grepl("2.3.2", threatmed$Y7.2.4) | grepl("2.3.2", threatmed$Y7.2.5) | grepl("2.3.2", threatmed$Y7.2.6) | grepl("2.3.2", threatmed$Y7.2.7) | grepl("2.3.2", threatmed$Y7.2.8) | grepl("2.3.2", threatmed$Y7.2.9) | grepl("2.3.2", threatmed$Y7.2.10) | grepl("2.3.2", threatmed$Y7.2.11) |
grepl("2.3.2", threatmed$Y7.3) |
grepl("2.3.2", threatmed$Y8.1) | grepl("2.3.2", threatmed$Y8.1.1) | grepl("2.3.2", threatmed$Y8.1.2) |
grepl("2.3.2", threatmed$Y8.2) | grepl("2.3.2", threatmed$Y8.2.1) | grepl("2.3.2", threatmed$Y8.2.2) |
grepl("2.3.2", threatmed$Y8.3) |
grepl("2.3.2", threatmed$Y8.4) | grepl("2.3.2", threatmed$Y8.4.1) | grepl("2.3.2", threatmed$Y8.4.2) |
grepl("2.3.2", threatmed$Y8.5) | grepl("2.3.2", threatmed$Y8.5.1) | grepl("2.3.2", threatmed$Y8.5.2) |
grepl("2.3.2", threatmed$Y8.6) |
grepl("2.3.2", threatmed$Y9.1) | grepl("2.3.2", threatmed$Y9.1.1) | grepl("2.3.2", threatmed$Y9.1.2) | grepl("2.3.2", threatmed$Y9.1.3) |
grepl("2.3.2", threatmed$Y9.2) | grepl("2.3.2", threatmed$Y9.2.1) | grepl("2.3.2", threatmed$Y9.2.2) | grepl("2.3.2", threatmed$Y9.2.3) |
grepl("2.3.2", threatmed$Y10.1) | grepl("2.3.2", threatmed$Y10.2) | grepl("2.3.2", threatmed$Y10.3) |
grepl("2.3.2", threatmed$Y11.1) | grepl("2.3.2", threatmed$Y11.2) | grepl("2.3.2", threatmed$Y11.3) | grepl("2.3.2", threatmed$Y11.4) | grepl("2.3.2", threatmed$Y11.5) |
grepl("2.3.2", threatmed$Y12.1)
)
Compnum <- nrow(Comp)
Compper <-round((Compnum/threatobsnum * 100), dig=2)
#Loss mutualism
LossMut <-subset(threatmed, grepl("2.3.3", threatmed$Y1.1) | grepl("2.3.3", threatmed$Y1.2) | grepl("2.3.3", threatmed$Y1.3) |
grepl("2.3.3", threatmed$Y2.1) | grepl("2.3.3", threatmed$Y2.1.1) | grepl("2.3.3", threatmed$Y2.1.2) | grepl("2.3.3", threatmed$Y2.1.3) | grepl("2.3.3", threatmed$Y2.1.4) |
grepl("2.3.3", threatmed$Y2.2) | grepl("2.3.3", threatmed$Y2.2.1) | grepl("2.3.3", threatmed$Y2.2.2) | grepl("2.3.3", threatmed$Y2.2.3) |
grepl("2.3.3", threatmed$Y2.3) | grepl("2.3.3", threatmed$Y2.3.1) | grepl("2.3.3", threatmed$Y2.3.2) | grepl("2.3.3", threatmed$Y2.3.3) | grepl("2.3.3", threatmed$Y2.3.4) |
grepl("2.3.3", threatmed$Y2.4) | grepl("2.3.3", threatmed$Y2.4.1) | grepl("2.3.3", threatmed$Y2.4.2) | grepl("2.3.3", threatmed$Y2.4.3) |
grepl("2.3.3", threatmed$Y3.1) | grepl("2.3.3", threatmed$Y3.2) | grepl("2.3.3", threatmed$Y3.3) |
grepl("2.3.3", threatmed$Y4.1) | grepl("2.3.3", threatmed$Y4.2) | grepl("2.3.3", threatmed$Y4.3) | grepl("2.3.3", threatmed$Y4.4) |
grepl("2.3.3", threatmed$Y5.1) | grepl("2.3.3", threatmed$Y5.1.1) | grepl("2.3.3", threatmed$Y5.1.2) | grepl("2.3.3", threatmed$Y5.1.3) | grepl("2.3.3", threatmed$Y5.1.4) |
grepl("2.3.3", threatmed$Y5.2) | grepl("2.3.3", threatmed$Y5.2.1) | grepl("2.3.3", threatmed$Y5.2.2) | grepl("2.3.3", threatmed$Y5.2.3) | grepl("2.3.3", threatmed$Y5.2.4) |
grepl("2.3.3", threatmed$Y5.3) | grepl("2.3.3", threatmed$Y5.3.1) | grepl("2.3.3", threatmed$Y5.3.2) | grepl("2.3.3", threatmed$Y5.3.3) | grepl("2.3.3", threatmed$Y5.3.4) |
grepl("2.3.3", threatmed$Y5.4) | grepl("2.3.3", threatmed$Y5.4.1) | grepl("2.3.3", threatmed$Y5.4.2) | grepl("2.3.3", threatmed$Y5.4.3) | grepl("2.3.3", threatmed$Y5.4.4) | grepl("2.3.3", threatmed$Y5.4.5) | grepl("2.3.3", threatmed$Y5.4.6) |
grepl("2.3.3", threatmed$Y6.1) | grepl("2.3.3", threatmed$Y6.2) | grepl("2.3.3", threatmed$Y6.3) |
grepl("2.3.3", threatmed$Y7.1) | grepl("2.3.3", threatmed$Y7.1.1) | grepl("2.3.3", threatmed$Y7.1.2) | grepl("2.3.3", threatmed$Y7.1.3) |
grepl("2.3.3", threatmed$Y7.2) | grepl("2.3.3", threatmed$Y7.2.1) | grepl("2.3.3", threatmed$Y7.2.2) | grepl("2.3.3", threatmed$Y7.2.3) | grepl("2.3.3", threatmed$Y7.2.4) | grepl("2.3.3", threatmed$Y7.2.5) | grepl("2.3.3", threatmed$Y7.2.6) | grepl("2.3.3", threatmed$Y7.2.7) | grepl("2.3.3", threatmed$Y7.2.8) | grepl("2.3.3", threatmed$Y7.2.9) | grepl("2.3.3", threatmed$Y7.2.10) | grepl("2.3.3", threatmed$Y7.2.11) |
grepl("2.3.3", threatmed$Y7.3) |
grepl("2.3.3", threatmed$Y8.1) | grepl("2.3.3", threatmed$Y8.1.1) | grepl("2.3.3", threatmed$Y8.1.2) |
grepl("2.3.3", threatmed$Y8.2) | grepl("2.3.3", threatmed$Y8.2.1) | grepl("2.3.3", threatmed$Y8.2.2) |
grepl("2.3.3", threatmed$Y8.3) |
grepl("2.3.3", threatmed$Y8.4) | grepl("2.3.3", threatmed$Y8.4.1) | grepl("2.3.3", threatmed$Y8.4.2) |
grepl("2.3.3", threatmed$Y8.5) | grepl("2.3.3", threatmed$Y8.5.1) | grepl("2.3.3", threatmed$Y8.5.2) |
grepl("2.3.3", threatmed$Y8.6) |
grepl("2.3.3", threatmed$Y9.1) | grepl("2.3.3", threatmed$Y9.1.1) | grepl("2.3.3", threatmed$Y9.1.2) | grepl("2.3.3", threatmed$Y9.1.3) |
grepl("2.3.3", threatmed$Y9.2) | grepl("2.3.3", threatmed$Y9.2.1) | grepl("2.3.3", threatmed$Y9.2.2) | grepl("2.3.3", threatmed$Y9.2.3) |
grepl("2.3.3", threatmed$Y10.1) | grepl("2.3.3", threatmed$Y10.2) | grepl("2.3.3", threatmed$Y10.3) |
grepl("2.3.3", threatmed$Y11.1) | grepl("2.3.3", threatmed$Y11.2) | grepl("2.3.3", threatmed$Y11.3) | grepl("2.3.3", threatmed$Y11.4) | grepl("2.3.3", threatmed$Y11.5) |
grepl("2.3.3", threatmed$Y12.1)
)
LossMutnum <- nrow(LossMut)
LossMutper <-round((LossMutnum/threatobsnum * 100), dig=2)
#loss pollinators
LossPoll <-subset(threatmed, grepl("2.3.4", threatmed$Y1.1) | grepl("2.3.4", threatmed$Y1.2) | grepl("2.3.4", threatmed$Y1.3) |
grepl("2.3.4", threatmed$Y2.1) | grepl("2.3.4", threatmed$Y2.1.1) | grepl("2.3.4", threatmed$Y2.1.2) | grepl("2.3.4", threatmed$Y2.1.3) | grepl("2.3.4", threatmed$Y2.1.4) |
grepl("2.3.4", threatmed$Y2.2) | grepl("2.3.4", threatmed$Y2.2.1) | grepl("2.3.4", threatmed$Y2.2.2) | grepl("2.3.4", threatmed$Y2.2.3) |
grepl("2.3.4", threatmed$Y2.3) | grepl("2.3.4", threatmed$Y2.3.1) | grepl("2.3.4", threatmed$Y2.3.2) | grepl("2.3.4", threatmed$Y2.3.3) | grepl("2.3.4", threatmed$Y2.3.4) |
grepl("2.3.4", threatmed$Y2.4) | grepl("2.3.4", threatmed$Y2.4.1) | grepl("2.3.4", threatmed$Y2.4.2) | grepl("2.3.4", threatmed$Y2.4.3) |
grepl("2.3.4", threatmed$Y3.1) | grepl("2.3.4", threatmed$Y3.2) | grepl("2.3.4", threatmed$Y3.3) |
grepl("2.3.4", threatmed$Y4.1) | grepl("2.3.4", threatmed$Y4.2) | grepl("2.3.4", threatmed$Y4.3) | grepl("2.3.4", threatmed$Y4.4) |
grepl("2.3.4", threatmed$Y5.1) | grepl("2.3.4", threatmed$Y5.1.1) | grepl("2.3.4", threatmed$Y5.1.2) | grepl("2.3.4", threatmed$Y5.1.3) | grepl("2.3.4", threatmed$Y5.1.4) |
grepl("2.3.4", threatmed$Y5.2) | grepl("2.3.4", threatmed$Y5.2.1) | grepl("2.3.4", threatmed$Y5.2.2) | grepl("2.3.4", threatmed$Y5.2.3) | grepl("2.3.4", threatmed$Y5.2.4) |
grepl("2.3.4", threatmed$Y5.3) | grepl("2.3.4", threatmed$Y5.3.1) | grepl("2.3.4", threatmed$Y5.3.2) | grepl("2.3.4", threatmed$Y5.3.3) | grepl("2.3.4", threatmed$Y5.3.4) |
grepl("2.3.4", threatmed$Y5.4) | grepl("2.3.4", threatmed$Y5.4.1) | grepl("2.3.4", threatmed$Y5.4.2) | grepl("2.3.4", threatmed$Y5.4.3) | grepl("2.3.4", threatmed$Y5.4.4) | grepl("2.3.4", threatmed$Y5.4.5) | grepl("2.3.4", threatmed$Y5.4.6) |
grepl("2.3.4", threatmed$Y6.1) | grepl("2.3.4", threatmed$Y6.2) | grepl("2.3.4", threatmed$Y6.3) |
grepl("2.3.4", threatmed$Y7.1) | grepl("2.3.4", threatmed$Y7.1.1) | grepl("2.3.4", threatmed$Y7.1.2) | grepl("2.3.4", threatmed$Y7.1.3) |
grepl("2.3.4", threatmed$Y7.2) | grepl("2.3.4", threatmed$Y7.2.1) | grepl("2.3.4", threatmed$Y7.2.2) | grepl("2.3.4", threatmed$Y7.2.3) | grepl("2.3.4", threatmed$Y7.2.4) | grepl("2.3.4", threatmed$Y7.2.5) | grepl("2.3.4", threatmed$Y7.2.6) | grepl("2.3.4", threatmed$Y7.2.7) | grepl("2.3.4", threatmed$Y7.2.8) | grepl("2.3.4", threatmed$Y7.2.9) | grepl("2.3.4", threatmed$Y7.2.10) | grepl("2.3.4", threatmed$Y7.2.11) |
grepl("2.3.4", threatmed$Y7.3) |
grepl("2.3.4", threatmed$Y8.1) | grepl("2.3.4", threatmed$Y8.1.1) | grepl("2.3.4", threatmed$Y8.1.2) |
grepl("2.3.4", threatmed$Y8.2) | grepl("2.3.4", threatmed$Y8.2.1) | grepl("2.3.4", threatmed$Y8.2.2) |
grepl("2.3.4", threatmed$Y8.3) |
grepl("2.3.4", threatmed$Y8.4) | grepl("2.3.4", threatmed$Y8.4.1) | grepl("2.3.4", threatmed$Y8.4.2) |
grepl("2.3.4", threatmed$Y8.5) | grepl("2.3.4", threatmed$Y8.5.1) | grepl("2.3.4", threatmed$Y8.5.2) |
grepl("2.3.4", threatmed$Y8.6) |
grepl("2.3.4", threatmed$Y9.1) | grepl("2.3.4", threatmed$Y9.1.1) | grepl("2.3.4", threatmed$Y9.1.2) | grepl("2.3.4", threatmed$Y9.1.3) |
grepl("2.3.4", threatmed$Y9.2) | grepl("2.3.4", threatmed$Y9.2.1) | grepl("2.3.4", threatmed$Y9.2.2) | grepl("2.3.4", threatmed$Y9.2.3) |
grepl("2.3.4", threatmed$Y10.1) | grepl("2.3.4", threatmed$Y10.2) | grepl("2.3.4", threatmed$Y10.3) |
grepl("2.3.4", threatmed$Y11.1) | grepl("2.3.4", threatmed$Y11.2) | grepl("2.3.4", threatmed$Y11.3) | grepl("2.3.4", threatmed$Y11.4) | grepl("2.3.4", threatmed$Y11.5) |
grepl("2.3.4", threatmed$Y12.1)
)
LossPollnum <- nrow(LossPoll)
LossPollper <-round((LossPollnum/threatobsnum * 100), dig=2)
#Inbreeding
Inbreed <-subset(threatmed, grepl("2.3.5", threatmed$Y1.1) | grepl("2.3.5", threatmed$Y1.2) | grepl("2.3.5", threatmed$Y1.3) |
grepl("2.3.5", threatmed$Y2.1) | grepl("2.3.5", threatmed$Y2.1.1) | grepl("2.3.5", threatmed$Y2.1.2) | grepl("2.3.5", threatmed$Y2.1.3) | grepl("2.3.5", threatmed$Y2.1.4) |
grepl("2.3.5", threatmed$Y2.2) | grepl("2.3.5", threatmed$Y2.2.1) | grepl("2.3.5", threatmed$Y2.2.2) | grepl("2.3.5", threatmed$Y2.2.3) |
grepl("2.3.5", threatmed$Y2.3) | grepl("2.3.5", threatmed$Y2.3.1) | grepl("2.3.5", threatmed$Y2.3.2) | grepl("2.3.5", threatmed$Y2.3.3) | grepl("2.3.5", threatmed$Y2.3.4) |
grepl("2.3.5", threatmed$Y2.4) | grepl("2.3.5", threatmed$Y2.4.1) | grepl("2.3.5", threatmed$Y2.4.2) | grepl("2.3.5", threatmed$Y2.4.3) |
grepl("2.3.5", threatmed$Y3.1) | grepl("2.3.5", threatmed$Y3.2) | grepl("2.3.5", threatmed$Y3.3) |
grepl("2.3.5", threatmed$Y4.1) | grepl("2.3.5", threatmed$Y4.2) | grepl("2.3.5", threatmed$Y4.3) | grepl("2.3.5", threatmed$Y4.4) |
grepl("2.3.5", threatmed$Y5.1) | grepl("2.3.5", threatmed$Y5.1.1) | grepl("2.3.5", threatmed$Y5.1.2) | grepl("2.3.5", threatmed$Y5.1.3) | grepl("2.3.5", threatmed$Y5.1.4) |
grepl("2.3.5", threatmed$Y5.2) | grepl("2.3.5", threatmed$Y5.2.1) | grepl("2.3.5", threatmed$Y5.2.2) | grepl("2.3.5", threatmed$Y5.2.3) | grepl("2.3.5", threatmed$Y5.2.4) |
grepl("2.3.5", threatmed$Y5.3) | grepl("2.3.5", threatmed$Y5.3.1) | grepl("2.3.5", threatmed$Y5.3.2) | grepl("2.3.5", threatmed$Y5.3.3) | grepl("2.3.5", threatmed$Y5.3.4) |
grepl("2.3.5", threatmed$Y5.4) | grepl("2.3.5", threatmed$Y5.4.1) | grepl("2.3.5", threatmed$Y5.4.2) | grepl("2.3.5", threatmed$Y5.4.3) | grepl("2.3.5", threatmed$Y5.4.4) | grepl("2.3.5", threatmed$Y5.4.5) | grepl("2.3.5", threatmed$Y5.4.6) |
grepl("2.3.5", threatmed$Y6.1) | grepl("2.3.5", threatmed$Y6.2) | grepl("2.3.5", threatmed$Y6.3) |
grepl("2.3.5", threatmed$Y7.1) | grepl("2.3.5", threatmed$Y7.1.1) | grepl("2.3.5", threatmed$Y7.1.2) | grepl("2.3.5", threatmed$Y7.1.3) |
grepl("2.3.5", threatmed$Y7.2) | grepl("2.3.5", threatmed$Y7.2.1) | grepl("2.3.5", threatmed$Y7.2.2) | grepl("2.3.5", threatmed$Y7.2.3) | grepl("2.3.5", threatmed$Y7.2.4) | grepl("2.3.5", threatmed$Y7.2.5) | grepl("2.3.5", threatmed$Y7.2.6) | grepl("2.3.5", threatmed$Y7.2.7) | grepl("2.3.5", threatmed$Y7.2.8) | grepl("2.3.5", threatmed$Y7.2.9) | grepl("2.3.5", threatmed$Y7.2.10) | grepl("2.3.5", threatmed$Y7.2.11) |
grepl("2.3.5", threatmed$Y7.3) |
grepl("2.3.5", threatmed$Y8.1) | grepl("2.3.5", threatmed$Y8.1.1) | grepl("2.3.5", threatmed$Y8.1.2) |
grepl("2.3.5", threatmed$Y8.2) | grepl("2.3.5", threatmed$Y8.2.1) | grepl("2.3.5", threatmed$Y8.2.2) |
grepl("2.3.5", threatmed$Y8.3) |
grepl("2.3.5", threatmed$Y8.4) | grepl("2.3.5", threatmed$Y8.4.1) | grepl("2.3.5", threatmed$Y8.4.2) |
grepl("2.3.5", threatmed$Y8.5) | grepl("2.3.5", threatmed$Y8.5.1) | grepl("2.3.5", threatmed$Y8.5.2) |
grepl("2.3.5", threatmed$Y8.6) |
grepl("2.3.5", threatmed$Y9.1) | grepl("2.3.5", threatmed$Y9.1.1) | grepl("2.3.5", threatmed$Y9.1.2) | grepl("2.3.5", threatmed$Y9.1.3) |
grepl("2.3.5", threatmed$Y9.2) | grepl("2.3.5", threatmed$Y9.2.1) | grepl("2.3.5", threatmed$Y9.2.2) | grepl("2.3.5", threatmed$Y9.2.3) |
grepl("2.3.5", threatmed$Y10.1) | grepl("2.3.5", threatmed$Y10.2) | grepl("2.3.5", threatmed$Y10.3) |
grepl("2.3.5", threatmed$Y11.1) | grepl("2.3.5", threatmed$Y11.2) | grepl("2.3.5", threatmed$Y11.3) | grepl("2.3.5", threatmed$Y11.4) | grepl("2.3.5", threatmed$Y11.5) |
grepl("2.3.5", threatmed$Y12.1)
)
Inbreednum <- nrow(Inbreed)
Inbreedper <-round((Inbreednum/threatobsnum * 100), dig=2)
#Skewed sex ratios
SkewSex <-subset(threatmed, grepl("2.3.6", threatmed$Y1.1) | grepl("2.3.6", threatmed$Y1.2) | grepl("2.3.6", threatmed$Y1.3) |
grepl("2.3.6", threatmed$Y2.1) | grepl("2.3.6", threatmed$Y2.1.1) | grepl("2.3.6", threatmed$Y2.1.2) | grepl("2.3.6", threatmed$Y2.1.3) | grepl("2.3.6", threatmed$Y2.1.4) |
grepl("2.3.6", threatmed$Y2.2) | grepl("2.3.6", threatmed$Y2.2.1) | grepl("2.3.6", threatmed$Y2.2.2) | grepl("2.3.6", threatmed$Y2.2.3) |
grepl("2.3.6", threatmed$Y2.3) | grepl("2.3.6", threatmed$Y2.3.1) | grepl("2.3.6", threatmed$Y2.3.2) | grepl("2.3.6", threatmed$Y2.3.3) | grepl("2.3.6", threatmed$Y2.3.4) |
grepl("2.3.6", threatmed$Y2.4) | grepl("2.3.6", threatmed$Y2.4.1) | grepl("2.3.6", threatmed$Y2.4.2) | grepl("2.3.6", threatmed$Y2.4.3) |
grepl("2.3.6", threatmed$Y3.1) | grepl("2.3.6", threatmed$Y3.2) | grepl("2.3.6", threatmed$Y3.3) |
grepl("2.3.6", threatmed$Y4.1) | grepl("2.3.6", threatmed$Y4.2) | grepl("2.3.6", threatmed$Y4.3) | grepl("2.3.6", threatmed$Y4.4) |
grepl("2.3.6", threatmed$Y5.1) | grepl("2.3.6", threatmed$Y5.1.1) | grepl("2.3.6", threatmed$Y5.1.2) | grepl("2.3.6", threatmed$Y5.1.3) | grepl("2.3.6", threatmed$Y5.1.4) |
grepl("2.3.6", threatmed$Y5.2) | grepl("2.3.6", threatmed$Y5.2.1) | grepl("2.3.6", threatmed$Y5.2.2) | grepl("2.3.6", threatmed$Y5.2.3) | grepl("2.3.6", threatmed$Y5.2.4) |
grepl("2.3.6", threatmed$Y5.3) | grepl("2.3.6", threatmed$Y5.3.1) | grepl("2.3.6", threatmed$Y5.3.2) | grepl("2.3.6", threatmed$Y5.3.3) | grepl("2.3.6", threatmed$Y5.3.4) |
grepl("2.3.6", threatmed$Y5.4) | grepl("2.3.6", threatmed$Y5.4.1) | grepl("2.3.6", threatmed$Y5.4.2) | grepl("2.3.6", threatmed$Y5.4.3) | grepl("2.3.6", threatmed$Y5.4.4) | grepl("2.3.6", threatmed$Y5.4.5) | grepl("2.3.6", threatmed$Y5.4.6) |
grepl("2.3.6", threatmed$Y6.1) | grepl("2.3.6", threatmed$Y6.2) | grepl("2.3.6", threatmed$Y6.3) |
grepl("2.3.6", threatmed$Y7.1) | grepl("2.3.6", threatmed$Y7.1.1) | grepl("2.3.6", threatmed$Y7.1.2) | grepl("2.3.6", threatmed$Y7.1.3) |
grepl("2.3.6", threatmed$Y7.2) | grepl("2.3.6", threatmed$Y7.2.1) | grepl("2.3.6", threatmed$Y7.2.2) | grepl("2.3.6", threatmed$Y7.2.3) | grepl("2.3.6", threatmed$Y7.2.4) | grepl("2.3.6", threatmed$Y7.2.5) | grepl("2.3.6", threatmed$Y7.2.6) | grepl("2.3.6", threatmed$Y7.2.7) | grepl("2.3.6", threatmed$Y7.2.8) | grepl("2.3.6", threatmed$Y7.2.9) | grepl("2.3.6", threatmed$Y7.2.10) | grepl("2.3.6", threatmed$Y7.2.11) |
grepl("2.3.6", threatmed$Y7.3) |
grepl("2.3.6", threatmed$Y8.1) | grepl("2.3.6", threatmed$Y8.1.1) | grepl("2.3.6", threatmed$Y8.1.2) |
grepl("2.3.6", threatmed$Y8.2) | grepl("2.3.6", threatmed$Y8.2.1) | grepl("2.3.6", threatmed$Y8.2.2) |
grepl("2.3.6", threatmed$Y8.3) |
grepl("2.3.6", threatmed$Y8.4) | grepl("2.3.6", threatmed$Y8.4.1) | grepl("2.3.6", threatmed$Y8.4.2) |
grepl("2.3.6", threatmed$Y8.5) | grepl("2.3.6", threatmed$Y8.5.1) | grepl("2.3.6", threatmed$Y8.5.2) |
grepl("2.3.6", threatmed$Y8.6) |
grepl("2.3.6", threatmed$Y9.1) | grepl("2.3.6", threatmed$Y9.1.1) | grepl("2.3.6", threatmed$Y9.1.2) | grepl("2.3.6", threatmed$Y9.1.3) |
grepl("2.3.6", threatmed$Y9.2) | grepl("2.3.6", threatmed$Y9.2.1) | grepl("2.3.6", threatmed$Y9.2.2) | grepl("2.3.6", threatmed$Y9.2.3) |
grepl("2.3.6", threatmed$Y10.1) | grepl("2.3.6", threatmed$Y10.2) | grepl("2.3.6", threatmed$Y10.3) |
grepl("2.3.6", threatmed$Y11.1) | grepl("2.3.6", threatmed$Y11.2) | grepl("2.3.6", threatmed$Y11.3) | grepl("2.3.6", threatmed$Y11.4) | grepl("2.3.6", threatmed$Y11.5) |
grepl("2.3.6", threatmed$Y12.1)
)
SkewSexnum <- nrow(SkewSex)
SkewSexper <-round((SkewSexnum/threatobsnum * 100), dig=2)
#Reduced reproductive success
RedRepSuc <-subset(threatmed, grepl("2.3.7", threatmed$Y1.1) | grepl("2.3.7", threatmed$Y1.2) | grepl("2.3.7", threatmed$Y1.3) |
grepl("2.3.7", threatmed$Y2.1) | grepl("2.3.7", threatmed$Y2.1.1) | grepl("2.3.7", threatmed$Y2.1.2) | grepl("2.3.7", threatmed$Y2.1.3) | grepl("2.3.7", threatmed$Y2.1.4) |
grepl("2.3.7", threatmed$Y2.2) | grepl("2.3.7", threatmed$Y2.2.1) | grepl("2.3.7", threatmed$Y2.2.2) | grepl("2.3.7", threatmed$Y2.2.3) |
grepl("2.3.7", threatmed$Y2.3) | grepl("2.3.7", threatmed$Y2.3.1) | grepl("2.3.7", threatmed$Y2.3.2) | grepl("2.3.7", threatmed$Y2.3.3) | grepl("2.3.7", threatmed$Y2.3.4) |
grepl("2.3.7", threatmed$Y2.4) | grepl("2.3.7", threatmed$Y2.4.1) | grepl("2.3.7", threatmed$Y2.4.2) | grepl("2.3.7", threatmed$Y2.4.3) |
grepl("2.3.7", threatmed$Y3.1) | grepl("2.3.7", threatmed$Y3.2) | grepl("2.3.7", threatmed$Y3.3) |
grepl("2.3.7", threatmed$Y4.1) | grepl("2.3.7", threatmed$Y4.2) | grepl("2.3.7", threatmed$Y4.3) | grepl("2.3.7", threatmed$Y4.4) |
grepl("2.3.7", threatmed$Y5.1) | grepl("2.3.7", threatmed$Y5.1.1) | grepl("2.3.7", threatmed$Y5.1.2) | grepl("2.3.7", threatmed$Y5.1.3) | grepl("2.3.7", threatmed$Y5.1.4) |
grepl("2.3.7", threatmed$Y5.2) | grepl("2.3.7", threatmed$Y5.2.1) | grepl("2.3.7", threatmed$Y5.2.2) | grepl("2.3.7", threatmed$Y5.2.3) | grepl("2.3.7", threatmed$Y5.2.4) |
grepl("2.3.7", threatmed$Y5.3) | grepl("2.3.7", threatmed$Y5.3.1) | grepl("2.3.7", threatmed$Y5.3.2) | grepl("2.3.7", threatmed$Y5.3.3) | grepl("2.3.7", threatmed$Y5.3.4) |
grepl("2.3.7", threatmed$Y5.4) | grepl("2.3.7", threatmed$Y5.4.1) | grepl("2.3.7", threatmed$Y5.4.2) | grepl("2.3.7", threatmed$Y5.4.3) | grepl("2.3.7", threatmed$Y5.4.4) | grepl("2.3.7", threatmed$Y5.4.5) | grepl("2.3.7", threatmed$Y5.4.6) |
grepl("2.3.7", threatmed$Y6.1) | grepl("2.3.7", threatmed$Y6.2) | grepl("2.3.7", threatmed$Y6.3) |
grepl("2.3.7", threatmed$Y7.1) | grepl("2.3.7", threatmed$Y7.1.1) | grepl("2.3.7", threatmed$Y7.1.2) | grepl("2.3.7", threatmed$Y7.1.3) |
grepl("2.3.7", threatmed$Y7.2) | grepl("2.3.7", threatmed$Y7.2.1) | grepl("2.3.7", threatmed$Y7.2.2) | grepl("2.3.7", threatmed$Y7.2.3) | grepl("2.3.7", threatmed$Y7.2.4) | grepl("2.3.7", threatmed$Y7.2.5) | grepl("2.3.7", threatmed$Y7.2.6) | grepl("2.3.7", threatmed$Y7.2.7) | grepl("2.3.7", threatmed$Y7.2.8) | grepl("2.3.7", threatmed$Y7.2.9) | grepl("2.3.7", threatmed$Y7.2.10) | grepl("2.3.7", threatmed$Y7.2.11) |
grepl("2.3.7", threatmed$Y7.3) |
grepl("2.3.7", threatmed$Y8.1) | grepl("2.3.7", threatmed$Y8.1.1) | grepl("2.3.7", threatmed$Y8.1.2) |
grepl("2.3.7", threatmed$Y8.2) | grepl("2.3.7", threatmed$Y8.2.1) | grepl("2.3.7", threatmed$Y8.2.2) |
grepl("2.3.7", threatmed$Y8.3) |
grepl("2.3.7", threatmed$Y8.4) | grepl("2.3.7", threatmed$Y8.4.1) | grepl("2.3.7", threatmed$Y8.4.2) |
grepl("2.3.7", threatmed$Y8.5) | grepl("2.3.7", threatmed$Y8.5.1) | grepl("2.3.7", threatmed$Y8.5.2) |
grepl("2.3.7", threatmed$Y8.6) |
grepl("2.3.7", threatmed$Y9.1) | grepl("2.3.7", threatmed$Y9.1.1) | grepl("2.3.7", threatmed$Y9.1.2) | grepl("2.3.7", threatmed$Y9.1.3) |
grepl("2.3.7", threatmed$Y9.2) | grepl("2.3.7", threatmed$Y9.2.1) | grepl("2.3.7", threatmed$Y9.2.2) | grepl("2.3.7", threatmed$Y9.2.3) |
grepl("2.3.7", threatmed$Y10.1) | grepl("2.3.7", threatmed$Y10.2) | grepl("2.3.7", threatmed$Y10.3) |
grepl("2.3.7", threatmed$Y11.1) | grepl("2.3.7", threatmed$Y11.2) | grepl("2.3.7", threatmed$Y11.3) | grepl("2.3.7", threatmed$Y11.4) | grepl("2.3.7", threatmed$Y11.5) |
grepl("2.3.7", threatmed$Y12.1)
)
RedRepSucnum <- nrow(RedRepSuc)
RedRepSucper <-round((RedRepSucnum/threatobsnum * 100), dig=2)
#Other
Oth <-subset(threatmed, grepl("2.3.8", threatmed$Y1.1) | grepl("2.3.8", threatmed$Y1.2) | grepl("2.3.8", threatmed$Y1.3) |
grepl("2.3.8", threatmed$Y2.1) | grepl("2.3.8", threatmed$Y2.1.1) | grepl("2.3.8", threatmed$Y2.1.2) | grepl("2.3.8", threatmed$Y2.1.3) | grepl("2.3.8", threatmed$Y2.1.4) |
grepl("2.3.8", threatmed$Y2.2) | grepl("2.3.8", threatmed$Y2.2.1) | grepl("2.3.8", threatmed$Y2.2.2) | grepl("2.3.8", threatmed$Y2.2.3) |
grepl("2.3.8", threatmed$Y2.3) | grepl("2.3.8", threatmed$Y2.3.1) | grepl("2.3.8", threatmed$Y2.3.2) | grepl("2.3.8", threatmed$Y2.3.3) | grepl("2.3.8", threatmed$Y2.3.4) |
grepl("2.3.8", threatmed$Y2.4) | grepl("2.3.8", threatmed$Y2.4.1) | grepl("2.3.8", threatmed$Y2.4.2) | grepl("2.3.8", threatmed$Y2.4.3) |
grepl("2.3.8", threatmed$Y3.1) | grepl("2.3.8", threatmed$Y3.2) | grepl("2.3.8", threatmed$Y3.3) |
grepl("2.3.8", threatmed$Y4.1) | grepl("2.3.8", threatmed$Y4.2) | grepl("2.3.8", threatmed$Y4.3) | grepl("2.3.8", threatmed$Y4.4) |
grepl("2.3.8", threatmed$Y5.1) | grepl("2.3.8", threatmed$Y5.1.1) | grepl("2.3.8", threatmed$Y5.1.2) | grepl("2.3.8", threatmed$Y5.1.3) | grepl("2.3.8", threatmed$Y5.1.4) |
grepl("2.3.8", threatmed$Y5.2) | grepl("2.3.8", threatmed$Y5.2.1) | grepl("2.3.8", threatmed$Y5.2.2) | grepl("2.3.8", threatmed$Y5.2.3) | grepl("2.3.8", threatmed$Y5.2.4) |
grepl("2.3.8", threatmed$Y5.3) | grepl("2.3.8", threatmed$Y5.3.1) | grepl("2.3.8", threatmed$Y5.3.2) | grepl("2.3.8", threatmed$Y5.3.3) | grepl("2.3.8", threatmed$Y5.3.4) |
grepl("2.3.8", threatmed$Y5.4) | grepl("2.3.8", threatmed$Y5.4.1) | grepl("2.3.8", threatmed$Y5.4.2) | grepl("2.3.8", threatmed$Y5.4.3) | grepl("2.3.8", threatmed$Y5.4.4) | grepl("2.3.8", threatmed$Y5.4.5) | grepl("2.3.8", threatmed$Y5.4.6) |
grepl("2.3.8", threatmed$Y6.1) | grepl("2.3.8", threatmed$Y6.2) | grepl("2.3.8", threatmed$Y6.3) |
grepl("2.3.8", threatmed$Y7.1) | grepl("2.3.8", threatmed$Y7.1.1) | grepl("2.3.8", threatmed$Y7.1.2) | grepl("2.3.8", threatmed$Y7.1.3) |
grepl("2.3.8", threatmed$Y7.2) | grepl("2.3.8", threatmed$Y7.2.1) | grepl("2.3.8", threatmed$Y7.2.2) | grepl("2.3.8", threatmed$Y7.2.3) | grepl("2.3.8", threatmed$Y7.2.4) | grepl("2.3.8", threatmed$Y7.2.5) | grepl("2.3.8", threatmed$Y7.2.6) | grepl("2.3.8", threatmed$Y7.2.7) | grepl("2.3.8", threatmed$Y7.2.8) | grepl("2.3.8", threatmed$Y7.2.9) | grepl("2.3.8", threatmed$Y7.2.10) | grepl("2.3.8", threatmed$Y7.2.11) |
grepl("2.3.8", threatmed$Y7.3) |
grepl("2.3.8", threatmed$Y8.1) | grepl("2.3.8", threatmed$Y8.1.1) | grepl("2.3.8", threatmed$Y8.1.2) |
grepl("2.3.8", threatmed$Y8.2) | grepl("2.3.8", threatmed$Y8.2.1) | grepl("2.3.8", threatmed$Y8.2.2) |
grepl("2.3.8", threatmed$Y8.3) |
grepl("2.3.8", threatmed$Y8.4) | grepl("2.3.8", threatmed$Y8.4.1) | grepl("2.3.8", threatmed$Y8.4.2) |
grepl("2.3.8", threatmed$Y8.5) | grepl("2.3.8", threatmed$Y8.5.1) | grepl("2.3.8", threatmed$Y8.5.2) |
grepl("2.3.8", threatmed$Y8.6) |
grepl("2.3.8", threatmed$Y9.1) | grepl("2.3.8", threatmed$Y9.1.1) | grepl("2.3.8", threatmed$Y9.1.2) | grepl("2.3.8", threatmed$Y9.1.3) |
grepl("2.3.8", threatmed$Y9.2) | grepl("2.3.8", threatmed$Y9.2.1) | grepl("2.3.8", threatmed$Y9.2.2) | grepl("2.3.8", threatmed$Y9.2.3) |
grepl("2.3.8", threatmed$Y10.1) | grepl("2.3.8", threatmed$Y10.2) | grepl("2.3.8", threatmed$Y10.3) |
grepl("2.3.8", threatmed$Y11.1) | grepl("2.3.8", threatmed$Y11.2) | grepl("2.3.8", threatmed$Y11.3) | grepl("2.3.8", threatmed$Y11.4) | grepl("2.3.8", threatmed$Y11.5) |
grepl("2.3.8", threatmed$Y12.1)
)
Othnum <- nrow(Oth)
Othper <-round((Othnum/threatobsnum * 100), dig=2)
## --------------------------------------------------------------------
# Combine stressors from threats
## --------------------------------------------------------------------
# Create data:
stressor = c("Ecosystem Conversion", "Ecosystem Degradation", "Indirect Ecosystem Effects", "Species Mortality", "Species Disturbance", "Hybridization", "Competition", "Reduced Reproductive Success", "Other")
value = c(EcoConper, EcoDegper, IndirEcoEffper, SpecMortper, SpecDistper, Hybridper, Compper, RedRepSucper, Othper)
stressdata <- data.frame(stressor, value)
#plot lollipop chart
data <- stressdata %>%
arrange(value) %>%
mutate(stressor = factor(stressor, stressor))
ggplot(data, aes(x=stressor, y=value)) +
geom_segment( aes(x=stressor, xend=stressor, y=0, yend=value)) +
geom_point( aes(x = stressor, y = value), size=5, color="orange" ) +
coord_flip() +
theme_light(base_size = 20) +
geom_text(aes(label=round(value, digits = 1), hjust=-.5), cex = 6) +
theme(
panel.grid.major = element_blank(),
panel.border = element_blank(),
axis.ticks.x = element_blank(),
axis.text.x = element_text(colour = "black"),
axis.text.y = element_text(colour = "black"),
axis.title.x = element_text(size = 32),
axis.title.y = element_text(size = 32),
legend.position = c(0.85, 0.15),
plot.margin = unit(c(0.5,0.5,0.5,0.5), "cm")) +
xlab("Stressor") +
ylab("Percentage Impacted") +
expand_limits(y = 85)
##------------------------------------------------------------------------------
#Fisher's Exact Test
##------------------------------------------------------------------------------
#eco conversion vs species mortality
fisher.test(matrix(c(EcoConnum, SpecMortnum, (threatobsnum - EcoConnum), (threatobsnum - SpecMortnum)), ncol = 2))
#eco degradation vs species mortality
fisher.test(matrix(c(EcoDegnum, SpecMortnum, (threatobsnum - EcoDegnum), (threatobsnum - SpecMortnum)), ncol = 2))