Learn R Programming

Perc (version 0.1.6)

findIDpaths: find all paths of a certain length for an individual

Description

findIDpaths identifies all unique win-loss pathways of order \((len - 1)\) beginning at selected ID

Usage

findIDpaths(conf, ID, len = 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.

ID

a numeric or character vector of length 1. It specifys the subject at the beginning of each pathway.

len

a positive integer of length 1 greater than 2. the length of the win-loss paths to be identified (\(len = order + 1\))

Value

return all win-loss paths of length(len) beginning at ID

See Also

as.conflictmat, findAllPaths, countPaths

Examples

Run this code
# NOT RUN {
confmatrix <- as.conflictmat(sampleEdgelist)
path38891 <- findIDpaths(confmatrix, ID = "Kuai", len = 2)
# }

Run the code above in your browser using DataLab