Given a dataset of points, it computes the Euclidean distances from each point to a specified target point. The function also identifies contiguous segments of points that fall within a specified radius around the target.
distanceToTarget(data, target, targetRadious = 0)A list containing:
A numeric vector of distances from each point in `data` to the `target`.
A list with two components: `start`, indicating the starting indices of contiguous segments of points within the target radius, and `length`, indicating the lengths of these segments.
The radius around the target point.
An object of class `trajectory` containing a collection of points with coordinates.
A numeric vector representing the coordinates of the target point.
A numeric value indicating the radius around the target point. Points within this radius are considered to be close to the target. Default is 0.