R Vector: Negative index, exclude element


Using a negative index will give you the same vector without that element


examples/negative_index.R
distances = c(11, 12, 13, 14)

nd = distances[-2]
print(nd)           # 11 13 14
print(distances)    # 11 12 13 14