A numeric vector representing the differences between the second group's location measure and the first group's location measure for each column.
Arguments
grp_1_data
A data frame where all columns are numeric, representing the first group of data.
grp_2_data
A data frame where all columns are numeric, representing the second group of data.
location
A string specifying the location measure to use for calculating differences. Must be either 'median' or 'mean'.
Details
The function checks if the specified location measure is valid ('median' or 'mean'). It also checks if both groups of data are numeric and if they have the same size and column variables. Based on the location measure, it calculates the differences and returns them as a numeric vector.