I have strL a variable (pgttype) that contains several results such as:
"Aneuploidy CRMI 13, 15, 16, 17, 18, 21, 22, X, Y"
"Translocation 46,XX,t(12;21)(q24.33;q22.13)"
"Aneuploidy CRMI 13, 15, 16, 17, 18, 21, 22, X, Y, Add Chromosome 14, Translocation 45,XY,der(13;14)(q10;q10), Gender Selection Pt Choice F"
I am trying to find a way to search within these long string variables to create a new variable (pgttype1) that discretely categorizes such as:
1) contains "aneuploidy" but does not contain "translocation"
or
2) contains "translocation" but does not contain "gender selection"
Can't seem to get it to work with regexm or strpos...
Any ideas?
Thanks in dance
Related Posts with Searching within strings
Predicted probability and classification statistics for xlogitDear Statalist users, I have two question regarding the fixed effect logit in panel settings. 1) I…
Reduce space between category in a graphHi all, I wonder how reduce the space between category in a graph, example: Code: clear all set m…
Chi-square problemHi! Help please! I have a table with variables "speciality", "city", and "status". I need to compare…
Test of overidentification after xtdpdsys, vce(robust)How can I test overidentification after xtdpdsys, vce(robust)? Sargan test doesn't work. …
Job Posting for Research Fellow in Student Social Support R&D Lab at Harvard Kennedy SchoolJob Posting for Research Fellow – Data & Survey Analyst Student Social Support R&D Lab at th…
Subscribe to:
Post Comments (Atom)
0 Response to Searching within strings
Post a Comment