Announcement

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

  • transpose/reshape problem

    Hello,
    I have data in the following format:

    PLACE GROUP_A GROUP_B GROUP_C
    Y 100 105 102
    Z 300 312 319

    I would like to get it into the following format:

    PLACE GROUP COUNT
    Y A 100
    Y B 105
    Y C 102
    Z A 300
    Z B 312
    Z C 319

    Is there a command or set of commands that can efficiently accomplish this task? I have played around with reshape and xpose but to no avail. Thank you for any guidance,

    James

  • #2
    Code:
    rename GROUP_* COUNT*
    reshape long COUNT, i(PLACE)  j(GROUP) string

    Comment


    • #3
      That works! Thank you very much Clyde.

      Comment

      Working...
      X