neighb: Actor or Group Neighborhood in Relational System

neighbR Documentation

Actor or Group Neighborhood in Relational System

Description

A function to find with a customized distance the neighbourhood of an actor or group of actors in a relational system representing a simple or multiple network.

Usage

neighb(x, rs, type = c("und", "inn", "out"), k = 1, inclx = FALSE, expand)

Arguments

x

A reference actor labeled in rs or a vector with a group of actors.

rs

Relational system of the network.

type

Type of system:

  • und for undirected (default)

  • inn for incoming node's ties to x

  • out for outgoing arcs from x

k

The “distance” of the neighbour nodes to x where k=1 is for adjacent nodes.

inclx

(logical) Include the reference actor in the output?

expand

(optional and logical) Should the output be given by k, for k>1.

Details

The relational system in rs represents either the full multiple network of actors or the subset of relational bundles that are mutual or asymmetric. Accordingly, this function identifies the nodes adjacent to ‘x’ within the specified relational system, as well as neighbouring nodes at a user-defined path length. Once the longest path or chain has been reached, increasing k will not add further nodes to the graph. The inn and out options apply to directed networks.

Notice that the output does not differentiate in case the chosen reference actors are in different components of the relational system.

Value

Depending on expand, the output is either a vector or a list with the neighbour nodes to the reference actor(s).

See Also

expos, rel.sys, bundles

Examples

# create 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 ) )

# establish the system of strong bonds
rs <- rel.sys(arr, bonds = "strong")

# obtain inmediate neighbourhood of the first node
neighb(1, rs)

multiplex documentation built on July 30, 2026, 5:13 p.m.