Hi. I have a string variable that comprises of multiple words with no fixed order/that is not the same combination of words across rows/observations . I want to generate a new variable that is equal (extracts) certain words from the string variable. For example, my string variable may contain "Cancer, breast; worldwide, neuronal, launched". I want to generate a variable stage that extracts only "launched" for this particular row/observation. There are just five words that I want to extract from the string variable across the entire dataset and no single row/observation carries more than one of the words that I want to extract. Any guidance on how to do this will be much appreciated.
Thanks.
Related Posts with Extracting part of a string variable
Error: Master Data not sorted by applying -glmdose-Dear Statalisters, I am looking for help on -glmdose-. code:mat def tp1=(0/6/12/24/60) glmdose m_…
predict fit, xbHi, what is the meaning of "predict fit, xb"?: Is it the value of the estimated variable? Thanks!…
Comparing Means Between Two GroupsI would like to compare the means of Group A with those of Group B. How would I see if there is any …
Identifying ICD-codes in 30 different variablesHi, I have a dataset containing one variable identifying study participants and 30 variables contai…
Rename variable in tabHi, I would like to rename my variable just in a tab. I don't want to create a new variable or rena…
Subscribe to:
Post Comments (Atom)
0 Response to Extracting part of a string variable
Post a Comment