neighb {multiplex} | R Documentation |
Neighborhood of Actor or Group of Actors
Description
A function to find the neighbourhood of an actor or group of actors with a customized distance.
Usage
neighb(x, rs, type = c("und", "inn", "out"), k = 1, inclx = FALSE, expand)
Arguments
x |
the reference actor labeled in |
rs |
the relational system of the network |
type |
whether the system is
|
k |
the “distance” of the neighbour nodes to the reference actor (where |
inclx |
(logical) should the reference actor be included in the output? |
expand |
(optional and logical) should the output be given by |
Details
The relational system serves to represent either the entire multiple network, or else just the relational bundles having a mutual or an asymmetric character.
In this sense, this function detects the adjacent nodes to x
according to the specified relational system, but as well the neighbours of the adjacent nodes with a customized length.
Eventually, when the longest path or chain is reached, adding more value to k
obviously will not produce more nodes in the graph system.
Type options inn
and out
are for directed networks.
Value
Depending on expand
, the output is either a vector or a list with the neighbour nodes to the reference actor(s).
Note
The output does not differentiate in case the reference actors are in different components of the network.
Author(s)
Antonio Rivero Ostoic
See Also
Examples
## Create the data: two binary relations among three elements
arr <- round( replace( array( runif(18), c(3 ,3, 2) ), array( runif(18),
c(3, 3, 2) ) > .9, 3 ) )
## Determine the system of strong bonds
rs <- rel.sys(arr, bonds = "strong")
## the inmediate neighbourhood of the first node
neighb(1, rs)