I have a data frame with total 32 variables which are positions(Lat/Long) for different converters/machines. First 16 variables (X1 to X16) are latitude and next 16 (Y1 to Y16) are longitudes for differnet converters.
I want to create 16 new columns called 'avg_dist_' which is the average distance of a single converter/machine from the remaining 15 converters. So total 16 new columns(i.e., an average distance for all the 16) such as avg_dist_1,avg_dist_2,avg_dist_3,....etc.
I want to use newly created columns to find correlations with DV.