sp_network_nodes-class: sp_network_nodes Class

Description Usage Arguments Slots See Also Examples

Description

An S4 class that contains all information on a single network. In this representation a network is composed of nodes which must be identified uniquely by and ID. Each node is described by variables stored in a data.frame. The node neighborhood matrix describes strength of links between the nodes of the network. The class is constructed by the sp_network_nodes() function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## S4 method for signature 'sp_network_nodes'
dat(object)

## S4 replacement method for signature 'sp_network_nodes'
dat(object) <- value

## S4 method for signature 'sp_network_nodes'
id(object)

## S4 replacement method for signature 'sp_network_nodes'
id(object) <- value

## S4 method for signature 'sp_network_nodes'
neighborhood(object)

## S4 replacement method for signature 'sp_network_nodes'
neighborhood(object) <- value

## S4 method for signature 'sp_network_nodes'
nnodes(object)

Arguments

object

A sp_network_nodes-class

value

An object to replace the existing id/data/neighborhood

Slots

network_id

A character that serves as an identifier for the network

nnodes

A numeric that indicates the number of nodes in the network

node_data

A data.frame that contains all information describing the nodes

node_neighborhood

A matrix that describes the neighborhood relations of the nodes

See Also

Other spflow network classes: sp_multi_network-class, sp_network_pair-class, spflow_network_classes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## access the data describing the nodes
new_dat <- dat(germany_net)

# access the id of the network
germany_net2 <- germany_net
id(germany_net2)
id(germany_net2) <- "Germany"

# access the neighborhood matrix of the nodes
neighborhood(germany_net)

# access the number of nodes inside the network
nnodes(germany_net)

spflow documentation built on Sept. 9, 2021, 5:06 p.m.