Skip to contents

Functions to get or set the names of the destination locations in a spatial interaction model.

Usage

destination_names(sim)

destination_names(sim) <- value

Arguments

sim

a spatial interaction model object

value

a character vector of length equal to the number of destination locations, or NULL (vectors of adapted length are converted to character vectors)

Value

for destination_names NULL or a character vector with one name per destination locations in the model. for destination_names<- the modified sim object

Examples

positions <- matrix(rnorm(10 * 2), ncol = 2)
rownames(positions) <- LETTERS[11:20]
distances <- as.matrix(dist(positions))
production <- rep(1, 10)
attractiveness <- rep(1, 10)
## the row/column names of the cost matrix are used for the location
model <- static_blvim(distances, production, 1.5, 1, attractiveness)
destination_names(model)
#>  [1] "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T"
destination_names(model) <- letters[1:10]
destination_names(model)
#>  [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j"