Learn R Programming

fastnet (version 1.0.0)

get.neighbors: Neighbors of an agent in a network

Description

Presents all neighbors of a given node.

Usage

get.neighbors(net, NodeID)

Arguments

net

The input network.

NodeID

The ID of the input node.

Value

A vector.

Details

Neighbors of a node are nodes that directly connects to this node.

Examples

Run this code
# NOT RUN {
x <-  net.ring.lattice(12,4)
get.neighbors(x,2)
# }

Run the code above in your browser using DataLab