Hi,
I have two queries regarding the following string variables in my database:
1. String Variable #1: Location of Export (- this variable contains values such as Singapore, US, India, Ghana etc.)
I have created a separate mapping file that maps individual countries to regions (eg. Singapore = Asia, US = North America, India = Asia, Ghana = Africa etc.)
I was wondering if there is any elegant way for me to replace the country names in "Location of Export" with the corresponding regions.
2. String Variable #2: Export Share (- this variable contains the absolute amount in USD million and the % share eg. 132.8 (54.0%))
Is there any way for me to extract only 54.0 from the above variable. I do not need the rest since I am working with only the % exports.
Thanks very much.
Related Posts with String variable related commands
Deleting a categoryHi I have 5 categories of a variable (education). I want to delete one category 'don't know'. Can an…
Tracking the replacement of older CEOs with younger onesDear Statalist Members, I am working with CompustatExecucomp merged data. I need to create a dummy v…
General Lasso ConfusionI ran a lasso regression on my data and it does not reach the r^2 that a regression of my own design…
How to change the color on the x, y axes labelsHow is the health of friends. One question please: How to change the color on the x, y axes I want w…
matching equal observations spread across two different variablesHi all, I wish to match the observations of assignment with equal observations from serial. For exa…
Subscribe to:
Post Comments (Atom)
0 Response to String variable related commands
Post a Comment