Assuming that you read the reprex article, you might have come up with something like this:
covid19 <- tibble::tribble(
~country, ~obsv_date, ~days, ~cases, ~deaths, ~recovered,
"Thailand", "25/01/2020", 3, 7, 0, 0,
"Thailand", "26/01/2020", 4, 8, 0, 2,
"Thailand", "27/01/2020", 5, 8, 0, 2,
"Thailand", "28/01/2020", 6, 14, 0, 5,
"Thailand", "29/01/2020", 7, 14, 0, 5,
"Thailand", "30/01/2020", 8, 14, 0, 5,
"Thailand", "31/01/2020", 9, 19, 0, 5,
"Thailand", "1/02/2020", 10, 19, 0, 5,
"Thailand", "2/02/2020", 11, 19, 0, 5,
"Thailand", "3/02/2020", 12, 19, 0, 5,
"Thailand", "4/02/2020", 13, 25, 0, 5,
"Thailand", "5/02/2020", 14, 25, 0, 5,
"Thailand", "6/02/2020", 15, 25, 0, 5,
"Thailand", "7/02/2020", 16, 25, 0, 5,
"Thailand", "8/02/2020", 17, 32, 0, 10,
"Thailand", "9/02/2020", 18, 32, 0, 10,
"Thailand", "10/02/2020", 19, 32, 0, 10,
"Thailand", "11/02/2020", 20, 33, 0, 10,
"Thailand", "12/02/2020", 21, 33, 0, 10,
"Thailand", "13/02/2020", 22, 33, 0, 12,
"Thailand", "14/02/2020", 23, 33, 0, 12,
"Thailand", "15/02/2020", 24, 33, 0, 12,
"Thailand", "16/02/2020", 25, 34, 0, 14,
"Thailand", "17/02/2020", 26, 35, 0, 15,
"Thailand", "18/02/2020", 27, 35, 0, 15,
"Thailand", "19/02/2020", 28, 35, 0, 15,
"Thailand", "20/02/2020", 29, 35, 0, 15,
"Thailand", "21/02/2020", 30, 35, 0, 17,
"Thailand", "22/02/2020", 31, 35, 0, 17,
"Thailand", "23/02/2020", 32, 35, 0, 21,
"Thailand", "24/02/2020", 33, 35, 0, 21,
"Thailand", "25/02/2020", 34, 37, 0, 22,
"Thailand", "26/02/2020", 35, 40, 0, 22,
"Thailand", "27/02/2020", 36, 40, 0, 22,
"Thailand", "28/02/2020", 37, 41, 0, 28,
"Thailand", "29/02/2020", 38, 42, 0, 28,
"Thailand", "1/03/2020", 39, 42, 1, 28,
"UK", "31/01/2020", 0, 2, 0, 0,
"UK", "1/02/2020", 1, 2, 0, 0,
"UK", "2/02/2020", 2, 2, 0, 0,
"UK", "3/02/2020", 3, 2, 0, 0,
"UK", "4/02/2020", 4, 2, 0, 0,
"UK", "5/02/2020", 5, 2, 0, 0,
"UK", "6/02/2020", 6, 2, 0, 0,
"UK", "7/02/2020", 7, 3, 0, 0,
"UK", "8/02/2020", 8, 3, 0, 0,
"UK", "9/02/2020", 9, 3, 0, 0,
"UK", "10/02/2020", 10, 8, 0, 0,
"UK", "11/02/2020", 11, 8, 0, 0,
"UK", "12/02/2020", 12, 9, 0, 1,
"UK", "13/02/2020", 13, 9, 0, 1,
"UK", "14/02/2020", 14, 9, 0, 1,
"UK", "15/02/2020", 15, 9, 0, 1,
"UK", "16/02/2020", 16, 9, 0, 8,
"UK", "17/02/2020", 17, 9, 0, 8,
"UK", "18/02/2020", 18, 9, 0, 8,
"UK", "19/02/2020", 19, 9, 0, 8,
"UK", "20/02/2020", 20, 9, 0, 8,
"UK", "21/02/2020", 21, 9, 0, 8,
"UK", "22/02/2020", 22, 9, 0, 8,
"UK", "23/02/2020", 23, 9, 0, 8,
"UK", "24/02/2020", 24, 13, 0, 8,
"UK", "25/02/2020", 25, 13, 0, 8,
"UK", "26/02/2020", 26, 13, 0, 8,
"UK", "27/02/2020", 27, 15, 0, 8,
"UK", "28/02/2020", 28, 20, 0, 8,
"UK", "29/02/2020", 29, 23, 0, 8,
"UK", "1/03/2020", 30, 36, 0, 8,
"United Arab Emirates", "29/01/2020", 0, 4, 0, 0,
"United Arab Emirates", "30/01/2020", 1, 4, 0, 0,
"United Arab Emirates", "31/01/2020", 2, 4, 0, 0,
"United Arab Emirates", "1/02/2020", 3, 4, 0, 0,
"United Arab Emirates", "2/02/2020", 4, 5, 0, 0,
"United Arab Emirates", "3/02/2020", 5, 5, 0, 0,
"United Arab Emirates", "4/02/2020", 6, 5, 0, 0,
"United Arab Emirates", "5/02/2020", 7, 5, 0, 0,
"United Arab Emirates", "6/02/2020", 8, 5, 0, 0,
"United Arab Emirates", "7/02/2020", 9, 5, 0, 0,
"United Arab Emirates", "8/02/2020", 10, 7, 0, 0,
"United Arab Emirates", "9/02/2020", 11, 7, 0, 0,
"United Arab Emirates", "10/02/2020", 12, 8, 0, 0,
"United Arab Emirates", "11/02/2020", 13, 8, 0, 0,
"United Arab Emirates", "12/02/2020", 14, 8, 0, 1,
"United Arab Emirates", "13/02/2020", 15, 8, 0, 1,
"United Arab Emirates", "14/02/2020", 16, 8, 0, 1,
"United Arab Emirates", "15/02/2020", 17, 8, 0, 3,
"United Arab Emirates", "16/02/2020", 18, 9, 0, 4,
"United Arab Emirates", "17/02/2020", 19, 9, 0, 4,
"United Arab Emirates", "18/02/2020", 20, 9, 0, 4,
"United Arab Emirates", "19/02/2020", 21, 9, 0, 4,
"United Arab Emirates", "20/02/2020", 22, 9, 0, 4,
"United Arab Emirates", "21/02/2020", 23, 9, 0, 4,
"United Arab Emirates", "22/02/2020", 24, 13, 0, 4,
"United Arab Emirates", "23/02/2020", 25, 13, 0, 4,
"United Arab Emirates", "24/02/2020", 26, 13, 0, 4,
"United Arab Emirates", "25/02/2020", 27, 13, 0, 4,
"United Arab Emirates", "26/02/2020", 28, 13, 0, 4,
"United Arab Emirates", "27/02/2020", 29, 13, 0, 4,
"United Arab Emirates", "28/02/2020", 30, 19, 0, 5,
"United Arab Emirates", "29/02/2020", 31, 21, 0, 5,
"United Arab Emirates", "1/03/2020", 32, 21, 0, 5
)
Which is this:
# A tibble: 101 x 6
country obsv_date days cases deaths recovered
<chr> <chr> <dbl> <dbl> <dbl> <dbl>
1 Thailand 25/01/2020 3 7 0 0
2 Thailand 26/01/2020 4 8 0 2
3 Thailand 27/01/2020 5 8 0 2
4 Thailand 28/01/2020 6 14 0 5
5 Thailand 29/01/2020 7 14 0 5
6 Thailand 30/01/2020 8 14 0 5
7 Thailand 31/01/2020 9 19 0 5
8 Thailand 1/02/2020 10 19 0 5
9 Thailand 2/02/2020 11 19 0 5
10 Thailand 3/02/2020 12 19 0 5
# ... with 91 more rows
This code:
covid19 %>%
group_by(country) %>%
summarise(total_cases = sum(cases), total_deaths = sum(deaths), total_recovered = sum(recovered))
Will give you this:
# A tibble: 3 x 4
country total_cases total_deaths total_recovered
<chr> <dbl> <dbl> <dbl>
1 Thailand 1058 1 445
2 UK 280 0 124
3 United Arab Emirates 301 0 69
And this will work even with for all the countries you have because it runs the summary based on the grouping (the country).