R Tutorial: Distance between two observations