Calculates the distance, or path length, between two actors part of the same network.
Arguments
- net
matrix, the adjacency matrix representing the relations between actors. Valid values are 0 and 1.
- ego1
numeric, value indicating ego1 (row number of net)
- ego2
numeric, value indicating ego2 (row number of net)
- degree
string, the type of path to be considered: "
outdegree
"; "indegree
"; "degree
".
Value
numeric vector of length one, with the distance between the two egos. If egos are not connected ts_geodist
returns Inf
.
Details
This function is a wrapper around the function sna::geodist
.