% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class_generics_and_maybes.R,
%   R/class_spflow_network_multi.R
\name{pair_merge}
\alias{pair_merge}
\alias{pair_merge,spflow_network_multi-method}
\title{Create a long form data.frame of origin-destination pairs}
\usage{
pair_merge(object, ...)

\S4method{pair_merge}{spflow_network_multi}(
  object,
  id_net_pair = id(object)[["pairs"]][[1]],
  dest_cols = NULL,
  orig_cols = NULL,
  pair_cols = NULL,
  make_cartesian = FALSE,
  keep_od_keys = TRUE
)
}
\arguments{
\item{object}{A \code{\link[=spflow_network_multi-class]{spflow_network_multi-class()}}}

\item{...}{Arguments to be passed to methods}

\item{id_net_pair}{A character indicating the id of a \code{\link[=spflow_network_pair-class]{spflow_network_pair-class()}}}

\item{dest_cols}{A character, indicating the columns to be kept in the final data.frame
that contain information on the nodes in the destination network.
(TRUE is a shortcut for everything).}

\item{orig_cols}{A character, indicating the columns to be kept in the final data.frame
that contain information on the nodes in the origin network.
(TRUE is a shortcut for everything).}

\item{pair_cols}{A character, indicating the columns to be kept in the final data.frame
that contain information on the origin-destination pairs.
(TRUE is a shortcut for everything).}

\item{make_cartesian}{A logical, when set to \code{TRUE} the resulting data.frame contains all
possible pairs of origins and destination, even if the data in the
\code{\link[=spflow_network_pair-class]{spflow_network_pair-class()}} does not have them.}

\item{keep_od_keys}{A logical, indicating whether the id of the od should be included.}
}
\value{
A single data.frame, combining all available information on origins, destinations and OD pairs
}
\description{
The method merges all available information on origins and destinations to
the data.frame describing the OD-pairs.
}
\examples{
# long form data for flows from Germany to Germany
pair_merge(multi_net_usa_ge,"ge_ge")

# long form data for flows from Germany to USA
pair_merge(multi_net_usa_ge,"ge_usa")
}
\seealso{
\code{\link[=spflow_network_multi-class]{spflow_network_multi-class()}}
}
\author{
Lukas Dargel
}
