Learn R Programming

spflow (version 0.1.0)

sp_network_nodes: Create a sp_network_nodes-class()

Description

Create a sp_network_nodes-class()

Usage

sp_network_nodes(
  network_id,
  node_neighborhood = NULL,
  node_data = NULL,
  node_key_column
)

Arguments

network_id

A character that serves as an identifier for the network

node_neighborhood

A matrix that describes the neighborhood of the nodes

node_data

A data.frame that contains all information describing the nodes

node_key_column

A character indicating the column containing the identifiers for the nodes

Value

An S4 class of type sp_network_nodes-class()

See Also

Other Constructors for spflow network classes: sp_multi_network, sp_network_pair, spflow_network_classes

Examples

Run this code
# NOT RUN {
sp_network_nodes("germany",
                 spdep::nb2mat(spdep::poly2nb(germany_grid)),
                 as.data.frame(germany_grid),
                 "ID_STATE")
# }

Run the code above in your browser using DataLab