Here is an example of manipulating the data with data I invented. Can you do the plot from there?
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
#Invent data
DF <- data.frame(Country=rep(c("U","F","C"),each=6),
time=rep(c("1980-Q1","1980-Q2","1980-Q3","1980-Q4","1981-Q1","1981-Q2"),3),
kg=c(30,32,31,34,29,33,29,27,28,30,26,27,29,30,28,27,26,29))
DF2 <- DF %>% filter(Country %in% c("U","F")) %>%
group_by(Country) %>%
mutate(CumKg = cumsum(kg))
DF2
#> # A tibble: 12 x 4
#> # Groups: Country [2]
#> Country time kg CumKg
#> <chr> <chr> <dbl> <dbl>
#> 1 U 1980-Q1 30 30
#> 2 U 1980-Q2 32 62
#> 3 U 1980-Q3 31 93
#> 4 U 1980-Q4 34 127
#> 5 U 1981-Q1 29 156
#> 6 U 1981-Q2 33 189
#> 7 F 1980-Q1 29 29
#> 8 F 1980-Q2 27 56
#> 9 F 1980-Q3 28 84
#> 10 F 1980-Q4 30 114
#> 11 F 1981-Q1 26 140
#> 12 F 1981-Q2 27 167
Created on 2020-11-28 by the reprex package (v0.3.0)