flow_matrix: Population flow matrix

Description Usage Arguments Details Value Author(s)

View source: R/movement_models.R

Description

Population flow matrix

Usage

1
2
flow_matrix(populations, distances, params, model = "gravity",
  place_names = NULL, symmetric = TRUE)

Arguments

populations

vector of populations.

distances

distance matrix. This is assumed to be symmetric so only lower triangle is of use.

params

a named list of model parameters. For gravity model the parameters are k, pow_from, pow_to, pow_dist.

model

at the moment only gravity model is supported.

place_names

optional. If not NULL, rownames of the returned matrix will be set.

symmetric

is the flow matrix symmetric. defaults to TRUE.

Details

flow from a location to itself is undefined (NA) under gravity model.

Value

N X N flow matrix where N is the length of the populations vector. i,jth element in this matrix is the flow from location i to location j. The diagonal is NA.

Author(s)

Sangeeta Bhatia


sangeetabhatia03/mover documentation built on Jan. 28, 2020, 4:39 a.m.