seq_sites: Sequential coastal site order

Description Usage Arguments Value Examples

Description

This function finds the order of sites along a convoluted but contiguous coastline. It is not designed to work for multiple different coastlines at once.

Usage

1
seq_sites(site_list, reverse = FALSE, coast = TRUE)

Arguments

site_list

A dataframe with a 'lon' and 'lat' column that contains coordinates along a coastline that need to be ordered.

reverse

A boolean TRUE/FALSE to determine if the ordering of the sites should be reversed on output. Default = FALSE.

coast

Should only the coastline be used to calculate the sequence of sites? Or should islands be included? Note that sites located on islands will have their sequence of order calculated after sites along the coast. This is generally not a desired outcome. Default = TRUE.

Value

A dataframe with the correct ordering of the input sites

Examples

1
2
SACTN_site_list_sub <- SACTN_site_list[17:32,]
SACTN_site_list_ordered <- seq_sites(SACTN_site_list_sub)

schrob040/coastR documentation built on May 10, 2019, 1:19 p.m.