createConnectivityWeb: Create a 'sf' dataframe with lines between connectivity zones

View source: R/createConnectivityWeb.R

createConnectivityWebR Documentation

Create a sf dataframe with lines between connectivity zones

Description

Function to create a sf dataframe with lines between connectivity zones

Usage

createConnectivityWeb(
  dfr,
  xCol = "lon",
  yCol = "lat",
  crs = sf::NA_crs_,
  wrapDateline = TRUE
)

Arguments

dfr

- a dataframe (or sf dataframe) with lat/lon or xy locations representing connectivity zones

xCol

- name of column with x-axis (longitude) location

yCol

- name of column with y-axis (latitude) location

crs

- coordinate reference system (object that can be converted to an sf::crs object; default is NA_crs_)

wrapDateline

- flag (T/F) to use 0 to 360 rather than -180 to 180 range for longitudes

Details

Creates a sf dataframe with a "web" of directed lines connecting connectivity zones. Coordinates for "start" and "end" zones are also given. If dfr is an sf dataframe, then the input value for crs is ignored and taken from dfr.

Value

a sf dataframe. The 'geometry' column contains lines which connect point locations identifying connectivity zones.


wStockhausen/rDisMELS documentation built on March 27, 2022, 1 a.m.