Skip to contents

A full circle is 2*pi, the sector of each point is determined by atan2(y,x), the angle of the point relative to the horizontal line of the introduction site

Usage

attribute_sectors(dataset, nb_sectors = 8, centroid = c(-75.67534, 40.41524))

Arguments

dataset

A dataset to be processed

nb_sectors

Number of sectors to divide the invasion space (default: 8)

centroid

Coordinates of the centroid to center the circle (long, lat; default: -75.675340, 40.415240)

Value

The same table as dataset with additional columns: sectors containing the total number of sectors considered, sectors_nb containing the sector number attributed to this cell

Examples

if (FALSE) { # \dontrun{
new_dataset <- attribute_sectors(dataset)
} # }