Hi! I'm working with a dataset that consists of around 500 schools, that gets updated every month. There is a specific set of schools (200) that I need to separate out of this total dataset, every month.
Here's a small example of how school list looks like:
I've been trying different ways to do it. Currently using this:
and so on so forth, adding the other schools I want to keep, however, I need to drop all but 200 of these schools, and this might take a while. (Although I realise i'd only have to write it out once)
Is there a better or more efficient way of doing this, instead of having to type out all 200 of the centers I want?
Thanks!
Here's a small example of how school list looks like:
Code:
clear input str35 center_name "17 Ward 3" "169 Ghanoli 2" "170 Namri 1" "170 Namri 1" "170 Namri 1" "17 Ward 3" "169 Ghanoli 2" "17 Ward 3" "170 Namri 1" "169 Ghanoli 2" end
Code:
keep if inlist(center, "169 Ghanoli 2", "17 Ward 3", "170 Namri 1")
Is there a better or more efficient way of doing this, instead of having to type out all 200 of the centers I want?
Thanks!
Comment