Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str29 salary_today "243,250 (307,840) (253,454)" "322,043 (342,970)" "279,102 (365,736)" "126,025[12]" "247,579††" "166218" "138,740†††" "161349" "130,646 (204,309)" "254160" "238908" "129,517 (175,081)***‡‡‡" "228190" "117763" "" "188,723" "135586" "161,349 (197,454)" "162056" end
Code:
. list
     +-----------------------------+
     |                salary_today |
     |-----------------------------|
  1. | 243,250 (307,840) (253,454) |
  2. |           322,043 (342,970) |
  3. |           279,102 (365,736) |
  4. |                 126,025[12] |
  5. |                   247,579†† |
     |-----------------------------|
  6. |                      166218 |
  7. |                  138,740††† |
  8. |                      161349 |
  9. |           130,646 (204,309) |
 10. |                      254160 |
     |-----------------------------|
 11. |                      238908 |
 12. |     129,517 (175,081)***‡‡‡ |
 13. |                      228190 |
 14. |                      117763 |
 15. |                             |
     |-----------------------------|
 16. |                     188,723 |
 17. |                      135586 |
 18. |           161,349 (197,454) |
 19. |                      162056 |
     +-----------------------------+
For example, for observation 12 salary will be 129517, salary_p1 will be 175081, salary_p2 will be missing , and salary_note will be ***‡‡‡.
0 Response to Generate multiple variables from a variable containing symbols and numbers
Post a Comment