Euclidean geometry functions for R