% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class_spflow_network_multi.R
\docType{class}
\name{spflow_network_multi-class}
\alias{spflow_network_multi-class}
\alias{id,spflow_network_multi-method}
\alias{complete_pairs,spflow_network_multi-method}
\alias{dat,spflow_network_multi-method}
\alias{dat<-,spflow_network_multi-method}
\alias{neighborhood,spflow_network_multi-method}
\alias{nnodes,spflow_network_multi-method}
\alias{npairs,spflow_network_multi-method}
\alias{pull_member,spflow_network_multi-method}
\alias{update_dat,spflow_network_multi-method}
\title{Class spflow_network_multi}
\usage{
\S4method{id}{spflow_network_multi}(object)

\S4method{complete_pairs}{spflow_network_multi}(object, ids_spflow_pairs = id(object)[["pairs"]])

\S4method{dat}{spflow_network_multi}(object, .id)

\S4method{dat}{spflow_network_multi}(object, .id) <- value

\S4method{neighborhood}{spflow_network_multi}(object, .id)

\S4method{nnodes}{spflow_network_multi}(object, .id)

\S4method{npairs}{spflow_network_multi}(object, .id)

\S4method{pull_member}{spflow_network_multi}(object, .id = NULL)

\S4method{update_dat}{spflow_network_multi}(object, new_dat)
}
\arguments{
\item{object}{spflow_network_multi-class}

\item{ids_spflow_pairs}{A character indicating of one or several \code{\link[=spflow_network_pair]{spflow_network_pair()}} objects}

\item{.id}{A character, corresponding to the id of a \code{spflow_network()} object
contained in the \code{spflow_network_multi}}

\item{value}{A data.frame to replace the existing data}

\item{new_dat}{A named list of data.frames that contain the new data.
The names should correspond to spflow_network or spflow_pair
objects contained in the \code{\link[=spflow_network_multi-class]{spflow_network_multi-class()}}.}
}
\description{
An S4 class that gathers information on multiple objects of types
\code{\link[=spflow_network-class]{spflow_network-class()}} and \code{\link[=spflow_network_pair-class]{spflow_network_pair-class()}}.
Its purpose is to ensure that the identification between the nodes that
serve as origins or destinations, and the OD-pairs is consistent
(similar to relational data bases).
}
\section{Slots}{

\describe{
\item{\code{nodes}}{A list of \code{\link[=spflow_network-class]{spflow_network-class()}} objects}

\item{\code{pairs}}{A list of \code{\link[=spflow_network_pair-class]{spflow_network_pair-class()}} objects}
}}

\examples{
## access the id of the objects inside the spflow_network_multi

id(multi_net_usa_ge)$nodes
id(multi_net_usa_ge)$pairs

## access the data inside a spflow_network_multi

dat(multi_net_usa_ge, "ge")    # extract data of nodes
dat(multi_net_usa_ge, "ge_ge") # extract data of pairs

## access the data of a network or a network_pair inside a multi_network

dat(multi_net_usa_ge, "ge")    # extract data of nodes
dat(multi_net_usa_ge, "ge_ge") # extract data of pairs

## access spflow_network or spflow_network_pair inside a spflow_network_multi

pull_member(multi_net_usa_ge, .id = "ge")
pull_member(multi_net_usa_ge, .id = "usa")
pull_member(multi_net_usa_ge, .id ="ge_ge")


# update data for individual observations
new_ge <- dat(multi_net_usa_ge, "ge")[1:2,1:2]
new_ge$X <- new_ge$X * .25
multi_net_usa_ge2 <- update_dat(multi_net_usa_ge, list("ge" = new_ge))
dat(multi_net_usa_ge2, "ge")

}
