transitivityChecker: Run the DAG method over a social network

Description Usage Arguments Details Value References Examples

View source: R/transitivityChecker.R

Description

Calculate transitivity of a network using the directed acyclic graph method.

Usage

1
2
transitivityChecker(disp.input, network.size, cutoff, conservative, write.wd,
  cores)

Arguments

disp.input

An edge-list-like data frame, formatted like the exInput data.

network.size

The subnetwork size (dyad, triad, quartet, etc.) at which to assess transitivity.

cutoff

The proportion of interactions a species needs to have won in order to be considered the winner.

conservative

TRUE or FALSE. Whether a tied interaction is set to a bidirectional edge or the edges are removed entirely.

write.wd

The path to the working directory where results will be written.

cores

The number of cores to employ for parallel processing. Set to 'seq' to run sequentially (i.e. not in parallel).

Details

Takes a larger dominance hierarchy/social network, and splits it into all possible subnetworks of the specified size. Simplifies each of those networks according to the arguments provided, then assesses subnetwork transitivity. Writes all results to write.wd. These results can be summarized in subsequent steps with transCruncher().

Value

Nothing to the workspace. Writes two RDS files to write.wd.

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

#look at transitivity of dyads
transitivityChecker(disp.input=exInput, network.size=2, cutoff=0.5,
  conservative=TRUE, write.wd=tempdir(), cores=4)

#here are all the possible subnetworks
allPoss <- readRDS(paste(tempdir(), "combn_results_2species_cutoff0.5.RDS",
  sep="/"))

#and here are transitivity results
transResults <- readRDS(paste(tempdir(),
   "trans_results_2species_cutoff0.5consTRUE.RDS", sep="/"))

#here are all transitive networks we had sufficient information to assess
allPoss[,which(transResults==TRUE)]

## End(Not run)

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