I am applying a complex function to a grouped data.frame. For simplicity reasons, here, this function will be treated as the colSums function. Let\'s assume we have the foll