I have a list of countries with the cumulative amount of cases (csum colum) by date in my dataframe (df)
I am trying to group by country and pull out the earliest date per country.
I tried the following code, but the dates it returns are incorrect:
df_2 = aggregate(df$date, by = list(df$country), FUN = "min")
Would anyone be able to see where i'm going wrong (p.s: I need to avoid using any libraries)
Thanks :)