make_passenger_od: Summaries a passenger volume

Description Usage Arguments Examples

View source: R/origin_destination.R

Description

Summaries a passenger volume

Usage

1
2
3
4
5
6
7
8
9
make_passenger_od(
  passenger,
  stations,
  depart,
  arrive,
  location,
  value,
  .all = FALSE
)

Arguments

passenger

passenger data

stations

data.frame which set of stopping points recorded in order of stopping.

depart

Column name of a stop.

arrive

Give the name of the column indicating the next stop at the target stop.

location

Name of the variable to use for the join, indicating its location.

value

origin-destination value name

.all

Make a join that contains rows of two datasets. The default value is FALSE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
jreast_jt_od %>%
  make_passenger_od(jreast_jt,
                    depart = departure_st_code,
                    arrive_st_code,
                    location = st_code,
                    value = volume) %>%
 dplyr::left_join(jreast_jt %>%
                    dplyr::select(arrive_st_code = st_code,
                                  next_st_name = st_name),
                   by = "arrive_st_code")

ssrn documentation built on July 1, 2020, 10:22 p.m.