binary_distance: Binary Distance of a Network Path

Description Usage Arguments Examples

View source: R/historical.R

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

1
binary_distance(sociomatrix, path)

Arguments

sociomatrix

a nonnegative, real valued sociomatrix.

path

an integer vector of node indices from sociomatrix.

Examples

1
2
3
4
5
## 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))

gretel documentation built on Aug. 22, 2019, 5:10 p.m.