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
Searching packages stored at SSC but returns nothingDear Stata users, I find an annoying problem recently. I search packages and Stata returns nothing,…
new table command cannot parse bracket within string variableIs this the correct place to report an apparent error in parsing? this is Stata/SE 17.0 for Windows …
Calculate how many words separated by a comma match between two string variables gameid year credits1 credits2 1 1996 Aleksandr Kravchuk,Alexey Menshikov,Alexey Menshikov,Rosti…
Interpolation Method: panel data setHello, I show you an example of the dataset that I have: Code: * Example generated by -dataex-. …
Hte package - I cannot perform the command with a poisson distributionHello I'm using the hte package, more specifically the hte sm function, in order to obtain a multil…
Subscribe to:
Post Comments (Atom)
0 Response to Searching within strings
Post a Comment