Hi Everyone
I have a basic question, which I still have not been able to solve. How can you delete observations from a variable that contains strings that have the specific word for instance.
For example, I have a variable of jobtitle and the observations can vary
"CEO"
"Chief Executive Officer"
"President"
"President & CEO"
"President & Chief Executive Officer"
"Chairman"
"CFO"
"Chief Financial Officer"
"Chairman & Chief Executive Officer"
Then how could I drop all the observations that contain the word "financial"/"CFO" for example?
Or is there any way I could keep only observations that contain a specific word such as "CEO" and "Chief Executive Officer" for example?
Since there are a lot of variations in this variable and I just want to include the one that is CEOs.
Thank you!
I have a basic question, which I still have not been able to solve. How can you delete observations from a variable that contains strings that have the specific word for instance.
For example, I have a variable of jobtitle and the observations can vary
"CEO"
"Chief Executive Officer"
"President"
"President & CEO"
"President & Chief Executive Officer"
"Chairman"
"CFO"
"Chief Financial Officer"
"Chairman & Chief Executive Officer"
Then how could I drop all the observations that contain the word "financial"/"CFO" for example?
Or is there any way I could keep only observations that contain a specific word such as "CEO" and "Chief Executive Officer" for example?
Since there are a lot of variations in this variable and I just want to include the one that is CEOs.
Thank you!
Comment