Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Splitting a string to two variables

    Hello!
    I currently have a dataset with each individuals ID listed as string variables : ID1, ID2, ID3 etc.
    ID
    ID1
    ID2
    ID3
    ID4
    I would like to have the variables simply as a numeric value as below.
    ID
    1
    2
    3
    I cannot figure out how to "split" the string variables. I look forward to your assistance.

    Thank you!

  • #2
    Code:
    destring ID, ignore("ID") replace

    Comment


    • #3
      Thank you!

      Comment

      Working...
      X