calculate_distances.RdCalculates distances froma x and y vectors
calculate_distances(mat_xy, first_value = NULL)
| first_value | value to be appended to the first position (typically NA, or 0), if NULL, nothing is appended |
|---|---|
| positions_x | vector of consecutive x positions |
| positions_y | vector of consecutive y positions |
vector of distances of length x-1 or x if first value is defined