Learn R Programming

blvim (version 0.1.1)

grid_destination_flow: Extract all the destination flows from a collection of spatial interaction models

Description

The function extract destination flows from all the spatial interaction models of the collection and returns them in a matrix in which each row corresponds to a model and each column to a destination location.

Usage

grid_destination_flow(sim_list, ...)

Value

a matrix of destination flows at the destination locations

Arguments

sim_list

a collection of spatial interaction models, an object of class sim_list

...

additional parameters for the destination_flow() function

See Also

destination_flow() and grid_blvim()

Examples

Run this code
distances <- french_cities_distances[1:10, 1:10] / 1000 ## convert to km
production <- rep(1, 10)
attractiveness <- log(french_cities$area[1:10])
all_flows <- grid_blvim(
  distances, production, c(1.1, 1.25, 1.5),
  c(1, 2, 3, 4) / 500, attractiveness,
  epsilon = 0.1
)
g_df <- grid_destination_flow(all_flows)
## should be 12 rows (3 times 4 parameter pairs) and 10 columns (10
## destination locations)
dim(g_df)

Run the code above in your browser using DataLab