View source: R/streamnet-package.R
calc_metrics | R Documentation |
Calculate connectivity metrics
calc_metrics(lines, lakes, map = FALSE)
lines |
sf lines object |
lakes |
sf polygon object |
map |
logical show a map output of the results? |
The units returned depend on the data source. Check with sf::st_crs
.
a list with the following elements:
Average link length
Stream order ratio
Closest lake distance
Number of upstream lakes
Upstream lake area
## Not run: data(nhd_sub_lines) data(nhd_sub_lakes) coords <- c(lon = -73.17581, lat = 41.38634) calc_metrics(nhd_sub_lines, nhd_sub_lakes) # don't error if lines is only one row calc_metrics(nhd_sub_lines[1,], nhd_sub_lakes) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.