I have a string variable (Size) that contains numbers and characters. I want to subtract number and create new_var1 and subtract character and create new_var2. Which code do I have to use to get the results like below? Thank you.
SIZE NEW_VAR1 NEW_VAR2
0.13 AC 0.13 AC
2560 SF 2560 SF
2145 SF 2145 SF
1.12 AC 1.12 AC
Related Posts with Subtract number and character separately from a string variable
Looping in StataHi, I am facing an issue that I am trying for a while. I want to create a dummy variable taking val…
Using macros with Drawnorm to "clone" multiple datasetsHi there I am trying to loop drawnorm over mutiple STATA datasets, however I want drawnorm to use t…
Oaxaca-Blinder decomposition: percentage greater than 100Dear all, I'm currently running the Oaxaca-Blinder Decomposition on a binary outcome variable, stun…
Interaction terms in regressionHello everyone, I am writing my BA-Thesis in Economics and hope somebody can help me out. First le…
How to compare the slope gradients after mixed commandDear Stata experts, I have a repeated measures study design where subjects were followed over 5 vis…
Subscribe to:
Post Comments (Atom)
0 Response to Subtract number and character separately from a string variable
Post a Comment