Learn R Programming

blvim (version 0.1.1)

flows: Extract the flow matrix from a spatial interaction model object

Description

Extract the flow matrix from a spatial interaction model object

Usage

flows(sim, ...)

Value

a matrix of flows between origin locations and destination locations

Arguments

sim

a spatial interaction model object

...

additional parameters

See Also

flows_df() for a data frame version of the flows, destination_flow() for destination flows.

Examples

Run this code
distances <- french_cities_distances[1:10, 1:10] / 1000 ## convert to km
production <- log(french_cities$population[1:10])
attractiveness <- log(french_cities$area[1:10])
## rescale to production
attractiveness <- attractiveness / sum(attractiveness) * sum(production)
model <- static_blvim(distances, production, 1.5, 1 / 500, attractiveness)
flows(model)

Run the code above in your browser using DataLab