plotPAC: Function to draw a circular plot to visualise potential...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/plotPAC.R

Description

Visualises the Potential for Apparent Competition as a circular graph with species represented by circles and shared parasitoids/predators/pollinators as connecting lines. Area of circles is proportional to species' abundance, filling of circles proportional to self-loops (e.g. parasitoids emerging from this species and then attacking it again) and width of connecting lines is proportional to “export” of parasitoids. The function is modelled after the example given in Morris et al. (2005)

Usage

1
2
3
plotPAC(web, scaling = 1, plot.scale = 1, fill.col = rgb(0.2, 0.2, 0.2, 0.5), 
arrow.col = rgb(0.5, 0.5, 0.5, 0.5), outby = 1, text = TRUE, 
circles = FALSE, radius = 1)

Arguments

web

A community matrix with lower trophic level in rows and higher trophic level in columns.

scaling

A factor scaling the size of species-circles. The default of 1 may cause overlap when there are many species or some are very large. Smaller values yield smaller circles.

plot.scale

Scales the whole plot to the plotting region. If you want to add labels, you may want more space around the plot and hence choose smaller values for plot.scale.

fill.col

Colour of the species-circles. Note that the default is using transparency, which is the fourth parameter in the rgb-function.

arrow.col

Colour of the arrows (in fact polygons) connecting species. As for fill.col, the default uses transparency.

outby

A factor determining by how much the text labels should be moved out from the species-circles. Values smaller than 1 will move them inside the circle-plot.

text

Logical; if TRUE (default), a number will be plotted next to each species-circle. There usually is no space to put the full name next to it, so there is currently no option to do so.

circles

Logical; shall species labels be put into a circle (as in the original plot of Morris et al. 2005)? Defaults to FALSE.

radius

A factor modifying the size of the label-circles.

Details

The function is modelled after Morris et al. (2005). The whole idea and application is explained there, too. The only change to their plotting is the default choice of transparency for clarity of the visual effect.

Value

None. The function is invoked for its side effects (i.e. printing).

Author(s)

Carsten F. Dormann [email protected]

References

Morris, R. J., Lewis, O. T. and Godfray, H. C. J. 2005 Apparent competition and insect community structure: towards a spatial perspective. Annales Zoologica Fennici 42, 449–462.

See Also

See also comments and notes in PAC!

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data(kevan1970)
plotPAC(kevan1970)

data(Safariland)
plotPAC(Safariland, plot.scale=1, fill.col="red", arrow.col="orange", 
	circles=TRUE, radius=1)

## End(Not run)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-3
Loading required package: sna
Loading required package: statnet.common
Loading required package: network
network: Classes for Relational Data
Version 1.13.0 created on 2015-08-31.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
                    Mark S. Handcock, University of California -- Los Angeles
                    David R. Hunter, Penn State University
                    Martina Morris, University of Washington
                    Skye Bender-deMoll, University of Washington
 For citation information, type citation("network").
 Type help("network-package") to get started.

sna: Tools for Social Network Analysis
Version 2.4 created on 2016-07-23.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
 For citation information, type citation("sna").
 Type help(package="sna") to get started.

 This is bipartite 2.08
 For latest changes see versionlog in  ?"bipartite-package".
 For citation see: citation("bipartite").
 Have a nice time plotting and analysing two-mode networks.


Attaching package: 'bipartite'

The following object is masked from 'package:vegan':

    nullmodel

bipartite documentation built on May 30, 2017, 1:25 a.m.