I have this datatable:
date, sentiment, price
2015-09-05, 1, 200
2015-09-05, 2, 200
2015-09-06, 1, 300
I would like to get a new datatable with the sum of the sentiment per day, keeping the daily price
I tried to do this:
new_dt <- dt%>%
select(date, sentiment, price)%>%
filter(date > "2015-09-05" & date <"2015-09-06")
group_by(date)
expected output:
date, sentiment, price
2015-09-05, 3, 200
2015-09-06, 1, 300