Description Usage Arguments Details Value
View source: R/calc_dist_mat_shp.R
Calculates the distance between all areas in a Shapefile object.
1 | calc_dist_mat_shp(shp)
|
shp |
The Shapefile object to use to calculate the distance matrix. |
This function calculates the distance matrix once to avoid doing it for every generation during an epidemic simulation. This is essential to later speed up the epidemic simulation. Note that this function assumes that the distances are in meters in the dataset! If that is not the case, you might want to either convert these, or adjust the output of this function.
Returns one matrix object containg the distances between all populated areas.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.