cost_matrix: Create square distance matrix

Description Usage Arguments Value

View source: R/cost_matrix.R

Description

This function allows you to create an Origin/Destination squared matrix from a Origin/Destination long format matrix

Usage

1
cost_matrix(tabcost, idpol, idori, iddes, iddist)

Arguments

tabcost

A data.frame of flows between origins and destinations (long format matrix containing, at least, 3 column : origins, destinations, flows)

idpol

A character vector id spatial units

idori

A character string giving the origin field name in tabflows

iddes

A character string giving the destination field name in tabflows

iddist

A character string giving the flow field name in tabflows

Value

A squared Origins (rows) and Destination (columns) matrix of flows


Geographie-cites/toyspace documentation built on July 11, 2019, 6:07 p.m.