Create Angular distance

R code for calculating angular distance on N variable vectors