I wonder if it is possible to split string variables containing numbers using 'split VariableA, parse(" ") gen(test_)' command.
I would like split Variable A into 2 parts (medication name and dose, for example: split AMOXICILLIN + CLAV A 875MG + 125MG into AMOXICILLIN + CLAV A and 875MG + 125MG). Data look as below.
PHP Code:
----------------------- copy starting from the next line -----------------------
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
input str41 DRUG_NAMEFORM_AND_STRENGTH
"ABCIXIMAB 10MG/5ML INJECTION-"
"ABEMACICLIB 100 MG TABLET- 56 ("
"AMOXICILLIN + CLAV A 875MG + 125MG"
"TAB-
BUDESONIDE+FORMOTERO 200MCG+6MCG/ACTN"
end
[/CODE]
------------------ copy up to and including the previous line ------------------
Oyun
0 Response to Splitting variable based on condition
Post a Comment