-
Notifications
You must be signed in to change notification settings - Fork 4
/
effectiveness.Rmd
84 lines (58 loc) · 3.51 KB
/
effectiveness.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
---
title: "Plotting effectiveness landscapes"
author: "Pedro Jordano"
date: "enero 28, 2015"
output: html_document
---
### Code for plotting the effectiveness landscape of mutualisms adding isolines of equal effectiveness values
Effectiveness landscapes are the two-dimensional representation of the possible combinations of the quantity and the quality of mutualistic services (seed dispersal, pollination) and with elevational contours representing isoclines of effectiveness. These representations can be 2D bivariate plots of multiplicative effects of any of the seed dispersal (SDE) or pollination (PE) effectiveness components.
This is a repository of the `R` package `effect.lndscp`used to produce these plots of the effectiveness landscapes.
The package plots effectiveness landscapes as described in:
Schupp, E. W., Jordano, P. and Gómez, J.M. 2010. Seed dispersal effectiveness revisited: a conceptual review. New Phytologist, 188: 333-353.
For additional details please visit the [web page here](https://github.com/pedroj/effectiveness_pckg). Or try [my GitHub repository](http://pedroj.github.io/effectiveness/).
Installation:
```{r install, echo=TRUE, eval=FALSE}
# Installation
devtools::install_github("pedroj/effectiveness_pckg")
library(effect.lndscp)
# Example datasets.
data(prunus)
data(cecropia)
```
### Example
These are two examples run on datasets available in the package. The second uses the function `effectiveness_plot` to illustrate how to use `ggrepel` functions to avoid the cluttering of labels in the plot when many species are included.
The function returns a `ggplot2` plot object that can be later customized with additional `ggplot2` options, as well as the actual plot.
```{r example, message=FALSE, warning=FALSE, fig.height= 6,fig.width=8}
#--------------------------------------------------------------------
# Based on a dataset of Prunus mahaleb frugivores.
# In this example we build the effectiveness landscape just for the
# quantitative component, plotting its two subcomponents, visitation
# rate and per-visit effectiveness.
#
require(effect.lndscp)
data(prunus)
effectiveness_plot(prunus$visits, prunus$eff_per_vis,
prunus$group, prunus$animal, 10,
myxlab= "No. visits/10h",
myylab="Effectiveness/vis (No. fruits handled)")
#--------------------------------------------------------------------
#--------------------------------------------------------------------
# Based on a dataset of Cecropia glaziovii frugivores.
# This effectiveness_plot function has repel labels activated.
data(cecropia)
effectiveness_plot(cecropia$totvis, cecropia$totbic,
cecropia$fam, cecropia$code, 10,
myxlab= "No. visits/10h",
myylab="Effectiveness/vis (No. fruits handled)")
#--------------------------------------------------------------------
```
### References
Schupp, E.W., Jordano, P. & Gomez, J.M. (2017). A general framework for effectiveness concepts in mutualisms. _Ecology Letters_, **20**, 577-590. doi: 10.1111/ele.12764
Schupp, E.W. (1993). Quantity, quality and the effectiveness of seed dispersal by animals. _Vegetatio_, **108**, 15–29.
Schupp, E.W., Jordano, P. & Gomez, J.M. (2010). Seed dispersal effectiveness revisited: a conceptual review. _New Phytologist_, **188**, 333–353.
Jordano, P. & Schupp, E. (2000). Seed disperser effectiveness: The quantity component and patterns of seed rain for _Prunus mahaleb_. Ecological Monographs, **70**, 591–615.
----------------------------------
```{r}
sessionInfo()
```
----------------------------------