Hello
I am currently in a dataset with a country variable containing all countries in the world since 1960. The problem is, that I want to keep only 50 of these countries. I have tried with enlist, but this is limited to only 10 strings. So currently I am stuck. I need it to be a code which can be used on 2 other datasets with the exact same problem, and I don't want to manually delete possible 15000 rows.
Do any of you have an idea to for instance keep if country == (the list below with country names)
Best regards Louise
I am currently in a dataset with a country variable containing all countries in the world since 1960. The problem is, that I want to keep only 50 of these countries. I have tried with enlist, but this is limited to only 10 strings. So currently I am stuck. I need it to be a code which can be used on 2 other datasets with the exact same problem, and I don't want to manually delete possible 15000 rows.
Do any of you have an idea to for instance keep if country == (the list below with country names)
Angola |
Burundi |
Benin |
Burkina Faso |
Botswana |
Central African Republic |
Côte d'Ivoire |
Cameroon |
D.R. of the Congo |
Congo |
Comoros |
Cabo Verde |
Djibouti |
Algeria |
Egypt |
Ethiopia |
Gabon |
Ghana |
Guinea |
Gambia |
Guinea-Bissau |
Equatorial Guinea |
Kenya |
Liberia |
Lesotho |
Morocco |
Madagascar |
Mali |
Mozambique |
Mauritania |
Mauritius |
Malawi |
Namibia |
Niger |
Nigeria |
Rwanda |
Sudan |
Senegal |
Sierra Leone |
Sao Tome and Principe |
Eswatini |
Seychelles |
Chad |
Togo |
Tunisia |
U.R. of Tanzania: Mainland |
Uganda |
South Africa |
Zambia |
Zimbabwe |
Best regards Louise
Comment