I am trying to find the first value of the day.
I have the following dataframe
time_str = c('2018-03-19 17:00:18', '2018-03-19 18:00:18', '2018-03-19 19:00:18', '2018-03-20 00:01:18', '2018-03-20 08:00:18', '2018-03-21 02:00:18', '2018-03-21 09:00:18')
value= c(1,2,1,3,4,5,9)
df=data.frame(time_str, value)
The result should be as dataframe that looks like this:
time_str value
1 2018-03-19 17:00:18 1
2 2018-03-20 00:01:18 3
3 2018-03-21 02:00:18 5