neighb: Neighborhood of an actor or group of actors

neighbR Documentation

Neighborhood of an 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 or a vector of several actors

rs

the relational system of the network

type

whether the system is

- und for undirected (default)

- inn for incoming node's ties to the reference actor

- out for outgoing arcs from the reference actor

k

the “distance” of the neighbour nodes to the reference actor (where k=1 gives the adjacent nodes)

inclx

(logical) should the reference actor be included in the output?

expand

(optional and logical) should the output be given by k (it only makes sense when k>1)

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

expos, rel.sys, bundles

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)


mplex/multiplex documentation built on April 9, 2024, 3:12 a.m.