I have an excel csv with a date/time column and a value associated with that date/time. I\'m trying to write a script that will go through this format (see below), and find 1) t
For another alternative, you could use data.table:
data.table
dat_table <- data.table(dat) dat_table [ , list(is_max = V3==max(V3), V2, V3), by= 'V1'][which(is_max),][,is_max :=NULL]
EDIT as per @MattDowle's comment
dat_table[, .SD[which.max(V3)], by=V1]
For an even simpler data.table solution.