countPaths: count paths between all pairs

Description Usage Arguments Value See Also Examples

View source: R/countPaths.R

Description

countPaths Identifies the number of paths of length less than or equal to maxLength between all pairs

Usage

1
countPaths(conf, maxLength = 2)

Arguments

conf

a matrix of conf.mat class. An N-by-N conflict matrix whose (i,j)th element is the number of times i defeated j.

maxLength

a positive numeric integer indicating the maximum length of paths to identify

Value

A list in which elements are number of paths between all pairs of a given length.

See Also

as.conflictmat, findIDpaths, transitivity, conductance

Examples

1
2
3
4
# convert an edgelist to conflict matrix
confmatrix <- as.conflictmat(sampleEdgelist)
# find number of paths of length 3 or less
npaths <- countPaths(confmatrix, 3)

Perc documentation built on April 28, 2020, 1:08 a.m.