Learn R Programming

spflow (version 0.1.0)

sp_network_nodes-class: sp_network_nodes Class

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

# S4 method for sp_network_nodes
dat(object)

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

# S4 method for sp_network_nodes id(object)

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

# S4 method for sp_network_nodes neighborhood(object)

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

# S4 method for 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

Run this code
# NOT RUN {
## 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)

# }

Run the code above in your browser using DataLab