Learn R Programming

swaRmverse (version 0.1.1)

frontness: Frontness

Description

Given the bearing angle of an object to another, this function calculates the frontness, a value that ranges from 0 to 1 and represents how in front the focal object is from its neighbor.

Usage

frontness(bs)

Value

A vector of the same length as bs representing the frontness of a focal object to its neighbor.

Arguments

bs

A vector of bearing angles (in rad) between objects.

Author

Marina Papadopoulou, m.papadopoulou.rug@gmail.com

See Also

nnba

Examples

Run this code
bs <- runif(25, max = pi)
frontness(bs)

Run the code above in your browser using DataLab