-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathod_aggregate_to.Rd
52 lines (48 loc) · 1.64 KB
/
od_aggregate_to.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/od-funs.R
\name{od_aggregate_to}
\alias{od_aggregate_to}
\title{Summary statistics of trips arriving at destination zones in OD data}
\usage{
od_aggregate_to(flow, attrib = NULL, FUN = sum, ..., col = 2)
}
\arguments{
\item{flow}{A data frame representing origin-destination data.
The first two columns of this data frame should correspond
to the first column of the data in the zones. Thus in \code{\link[=cents_sf]{cents_sf()}},
the first column is geo_code. This corresponds to the first two columns
of \code{\link[=flow]{flow()}}.}
\item{attrib}{character, column names in sl to be aggregated}
\item{FUN}{A function to summarise OD data by}
\item{...}{Additional arguments passed to \code{FUN}}
\item{col}{The column that the OD dataset is grouped by
(1 by default, the first column usually represents the origin)}
}
\description{
This function takes a data frame of OD data and
returns a data frame reporting summary statistics for each unique zone of destination.
}
\details{
It has some default settings: it assumes the destination ID column is the 2nd
and the default summary statistic is \code{sum()}.
By default, if \code{attrib} is not set, it summarises all numeric columns.
}
\examples{
od_aggregate_to(flow)
}
\seealso{
Other od:
\code{\link{od2line}()},
\code{\link{od2odf}()},
\code{\link{od_aggregate_from}()},
\code{\link{od_coords}()},
\code{\link{od_coords2line}()},
\code{\link{od_id}},
\code{\link{od_id_order}()},
\code{\link{od_oneway}()},
\code{\link{od_to_odmatrix}()},
\code{\link{odmatrix_to_od}()},
\code{\link{points2flow}()},
\code{\link{points2odf}()}
}
\concept{od}