Hi everyone,
I have tried to collapse multiple rows per id in terms of the maximum values. I can do it using dplyr command:
data%
group_by(id) %>%
summarise_each(funs(max(., na.rm = TRUE)))
However, for a large data, it is little too slow. I tried the following using data.table but it produces wrong result:
data