I have this table already in variable DATA in R, loaded from csv
country, date, confirmed
Afghanistan, 2020-03-16, 21
Afghanistan, 2020-03-17, 22
Afghanistan, 2020-03-18, 22
Albania, 2020-03-16, 23
Albania, 2020-03-17, 33
Albania, 2020-03-18, 38
...
I would like to make this query in R
select date, sum(confirmed) as confirmed FROM `Table` group by date
Any idea pls ?
So results should be this
date,confirmed
2020-03-16, 44
2020-03-17, 55
2020-03-18, 60