0
I have that data
data;code
18/02/2020;C106
05/04/2018;C107
11/09/2016;C107
16/02/2019;C109
11/03/2020;C110
04/03/2020;C114
18/02/2020;C114
06/02/2020;C121
I would like to select the latest date of each code, so:
data;code
18/02/2020;C106
05/04/2018;C107
16/02/2019;C109
11/03/2020;C110
04/03/2020;C114
06/02/2020;C121
tried to use
tapply(data$data, data$code, max)
and that mistake appeared
Error in Summary.factor(7L, na.rm = FALSE) :
‘max’ not meaningful for factors