Find the max of a group in one column then reference another column value in that row
I’m working with a data frame that has multiple groups. I want to find the maximum value of a group in one column and then reference the value of another column in that same row in order to populate a new column.