Get Weekly Spend helper function
hlpr_get_weekly_spend.RdThis function calculates the weekly spend based on the scaling method and values provided in the MRM object.
Details
The function checks the scaling method used in the MRM object and calculates the weekly spend accordingly. If the scaling method is "min_max", it uses the mean of the data and the min-max scaling values to calculate the weekly spend. If the scaling method is "std", it uses the mean of the data and the standard deviation scaling values to calculate the weekly spend. If an invalid scaling method is provided, an error is raised.