Hello Stata Community
I have a very big number of observations and I want to filter out the ones which contain at least one of the 20 key words I have. The problem is, that the observations are sentences and not just one word.
I have tried the command:
keep if inlist(Resolution,"drill" , "dioxin" , "clean up" , "nuclear" , "environment" , "environmental" , "pollution" , "energy" , "power" , "chlorine" , "trees" , "GHG" , "emissions" , "forest" , "recycling" , "recycled" , "mercury" , "water" , "filter" , "gene-engineered" , "mining" , "PVC" , "old growth wood" , "waste" , "paper" , "radioactive" , "toxic" , "plutonium" , "renewable" , "greenhouse gas" , "climate" , "CO2" , "parabens" , "phthalates")
but there is always an error saying that the expression is to long.
Do you have an idea, how I could do this? Thank you very much for your help.
I have a very big number of observations and I want to filter out the ones which contain at least one of the 20 key words I have. The problem is, that the observations are sentences and not just one word.
I have tried the command:
keep if inlist(Resolution,"drill" , "dioxin" , "clean up" , "nuclear" , "environment" , "environmental" , "pollution" , "energy" , "power" , "chlorine" , "trees" , "GHG" , "emissions" , "forest" , "recycling" , "recycled" , "mercury" , "water" , "filter" , "gene-engineered" , "mining" , "PVC" , "old growth wood" , "waste" , "paper" , "radioactive" , "toxic" , "plutonium" , "renewable" , "greenhouse gas" , "climate" , "CO2" , "parabens" , "phthalates")
but there is always an error saying that the expression is to long.
Do you have an idea, how I could do this? Thank you very much for your help.
Comment