I have a data frame with two variables: dates and value and and I want to select the date in which there was the maximum value. The max () function gives me the maximum value of the value variable but I don't know if there is any way to get the date that this value occurred, does anyone have any ideas?