to.tcmat: Creation of a transport costs matrix

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Creation of a tcmat list object from a given transport costs table

Usage

1
to.tcmat(dataset, colname.from, colname.to, colname.tc)

Arguments

dataset

A data frame containing the transport costs table

colname.from

Name of the column containing the origin IDs

colname.to

Name of the column containing the destination IDs

colname.tc

Name of the column containing the transport costs (e.g. airline distances, travel times)

Details

Creation of a tcmat list object (Transport costs matrix) from a given table for further use in huff and mcimat.create.

Value

A tcmat list (invisible) containing the following components:

coords_origins

A data.frame

coords_destinations

A data.frame

tcmat

A data.frame containing the transport costs matrix

tc.mode

A list containing information about the transportation costs matrix

Author(s)

Thomas Wieland

See Also

huff, mcimat.create, tcmat.create

Examples

1
2
3
4
5
data(Haslach_tcmatDrvtime)
# Travel times from the Haslach example
Haslach_tcmat <- to.tcmat (Haslach_tcmatDrvtime, "from", "to", "tc")
# Creating new tcmat object
Haslach_tcmat

MCI2 documentation built on Aug. 2, 2019, 5:04 p.m.