least_cost_distance | R Documentation |
Calculate pairwise wind cost-distances (e.g. travel times) or flow rates (the inverse of cost-distances) among a set of sites, using the least cost path algorithm. This function is a wrapper around costDistance.
least_cost_distance(graph, sites, adjust = TRUE, rate = FALSE)
graph |
A wind_graph. |
sites |
A two-column matrix of point coordinates. |
adjust |
Whether to scale results to correct for discrepancies between point-to-point distances and cell-to-cell distances. Default is TRUE. |
rate |
Whether to return values as "rates" instead of the default "cost distances". Rates are the inverse of cost distances, representing flow rather than travel time. |
A square matrix of wind travel times.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.