I would like to sum rows of two columns based on a condition of a variable "country". The output should give a new column that has only values for specified countries and NA's for the rest. For instance:
P R Country Total
1 1 IT 2
2 2 DE 4
3 3 FR NA
4 4 FR NA
5 5 DE 10
6 6 IT 12