spflow_network: Create a 'spflow_network-class()'

View source: R/class_spflow_network.R

spflow_networkR Documentation

Create a spflow_network-class()

Description

Create a spflow_network-class()

Usage

spflow_network(
  id_net,
  node_neighborhood = NULL,
  node_data = NULL,
  node_key_column,
  node_coord_columns,
  derive_coordinates = missing(node_coord_columns),
  prefer_lonlat = TRUE,
  normalize_byrow = FALSE
)

Arguments

id_net

A character that serves as an identifier for the set of nodes

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

node_coord_columns

A character indicating the columns that represent the coordinates of the nodes. For example c("LON", "LAT").

derive_coordinates

A logical indicating whether there should be an attempt to infer the coordinates from the node_data.

prefer_lonlat

A logical indicating whether the coordinates should be transformed to longitude and latitude.

normalize_byrow

A logical, if TRUE the neighborhood will be row-normalized, otherwise it is scaled to have a spectral radius of one.

Value

An S4 class of type spflow_network-class()

Examples

spflow_network(
  "germany",
  spdep::nb2mat(spdep::poly2nb(germany_grid)),
  as.data.frame(germany_grid),
  "ID_STATE")

LukeCe/spflow documentation built on Nov. 11, 2023, 8:20 p.m.