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.
Related Posts with Keep variables if they contain at least one word of a given list
reshaping and creating unique "j()" within same idHi, I have a long-long format data set as below, I made reshaping before, but this time it is hard t…
Labeling a single observation on a scatter plot.I looking at the relation between years of education and vaccine skepticism across countries. I want…
Creating new variables repeatedlyDear Statalisters, I have 1696 variables for which there daily values available for a period of 16 …
How to find a Conditional Greatest Date based on a subject identifier?Hello Forum Members, I hope you can help with this conditional date finding problem. I have a datab…
Multi-level model with mediator and index variable from survey-level dataHi. I am attempting to perform a regression on a combined micro (individual level data from survey …
Subscribe to:
Post Comments (Atom)
0 Response to Keep variables if they contain at least one word of a given list
Post a Comment