Learn R Programming

spflow (version 0.1.0)

sp_network_pair: Create an S4 object that contains information on origin-destination pairs

Description

Create an S4 object that contains information on origin-destination pairs

Usage

sp_network_pair(
  orig_net_id,
  dest_net_id,
  pair_data = NULL,
  orig_key_column,
  dest_key_column
)

Arguments

orig_net_id

A character that serves as identifier for the origin network

dest_net_id

A character that serves as identifier for the destination network

pair_data

A data.frame containing information on the origin-destination pairs

orig_key_column

A character indicating the name of the column containing the identifiers of the origins

dest_key_column

A character indicating the name of the column containing the identifiers of the destinations

Value

An S4 class of type sp_network_pair-class()

See Also

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

Examples

Run this code
# NOT RUN {
pair_frame <- data.frame(
  ORIG_ID_STATE = rep(germany_grid$ID_STATE, times = 16),
  DEST_ID_STATE = rep(germany_grid$ID_STATE, each = 16))
sp_network_pair("ge","ge",pair_frame,"ORIG_ID_STATE","DEST_ID_STATE")
# }

Run the code above in your browser using DataLab