Calculates distances froma x and y vectors

calculate_distances(mat_xy, first_value = NULL)

Arguments

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

Value

vector of distances of length x-1 or x if first value is defined