I m an R beginner. I d Like to know how to create a new column (called "datemax") from column "date". In column "date" I have different IDs and each ID has one or more values for date , e.g. one ID but 3 lines, one with the value 1 one with value 2 and one with value 3 in column date. I want to add the column "datemax" and delete "date" , in the end I would have one line per ID and datemax gives the highest value for date. I found the funktion maxvalue, but how do I get the highest value per ID and not for the hole column "date"?
I tried maxvalue but I don't know how to integrate "per ID"