transPlotter: Plot function for transitivity results

Description Usage Arguments Details Value References Examples

View source: R/transPlotter.R

Description

Plot the summarized results from multiple calls to transitivityChecker.

Usage

1
transPlotter(results.list, color)

Arguments

results.list

A list of results from multiple calls to transitivityChecker.

color

Whether to plot each result in a different color, or a different line type.

Details

Uses a Brewer color palette to plot the results of multiple calls to transitivityChecker(). Each unique subnetwork size gets its own color.

Value

An R plot.

References

Miller, E. T., D. N. Bonter, C. Eldermire, B. G. Freeman, E. I. Greig, L. J. Harmon, C. Lisle, and W. M. Hochachka. 2017. Fighting over food unites the birds of North America in a continental dominance hierarchy. biorxiv https://doi.org/10.1101/104133

Examples

 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
#load in the example data
## Not run: 
data(exInput)

#look at transitivity of dyads. this whole thing will take a few minutes
#to run. be patient.
transitivityChecker(disp.input=exInput, network.size=2, cutoff=0.5,
  conservative=TRUE, write.wd=tempdir(), cores=4)

transitivityChecker(disp.input=exInput, network.size=2, cutoff=0.6,
  conservative=TRUE, write.wd=tempdir(), cores=4)

transitivityChecker(disp.input=exInput, network.size=2, cutoff=0.7,
  conservative=TRUE, write.wd=tempdir(), cores=4)

transitivityChecker(disp.input=exInput, network.size=2, cutoff=0.8,
  conservative=TRUE, write.wd=tempdir(), cores=4)

transitivityChecker(disp.input=exInput, network.size=2, cutoff=0.9,
  conservative=TRUE, write.wd=tempdir(), cores=4)

transitivityChecker(disp.input=exInput, network.size=2, cutoff=1.0,
  conservative=TRUE, write.wd=tempdir(), cores=4)

#now look at transitivity of a couple triad thresholds
transitivityChecker(disp.input=exInput, network.size=3, cutoff=0.5,
  conservative=TRUE, write.wd=tempdir(), cores=4)

transitivityChecker(disp.input=exInput, network.size=3, cutoff=1.0,
  conservative=TRUE, write.wd=tempdir(), cores=4)

twoSpp <- transCruncher(2, TRUE, tempdir())
threeSpp <- transCruncher(3, TRUE, tempdir())

#bind together just the count results for plotting
toPlot <- list(twoSpp$counts, threeSpp$counts)

transPlotter(toPlot, color=TRUE)

## End(Not run)

eliotmiller/networkTricks documentation built on Oct. 6, 2020, 4:23 p.m.