I am trying to merge a dataset structured in a long format as below: There are 40 variables, but I am only including these as an example
country subsample totalp