binary_distance {gretel} | R Documentation |
Binary Distance of a Network Path
Description
Calculates the binary distance of a user-specified network path through a network,
if all edges exist. Otherwise, returns Inf
to signify infinite distance.
Usage
binary_distance(sociomatrix, path)
Arguments
sociomatrix |
a nonnegative, real valued sociomatrix. |
path |
an integer vector of node indices from |
Examples
## Calculate binary distance along a path in a sociomatrix
binary_distance(YangKnoke01, path = c(1,2,5))
## This path doesn't exist
binary_distance(YangKnoke01, path = c(1,2,4,5))
[Package gretel version 0.0.1 Index]