Announcement

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

  • Combining many columns with missing values

    Hi everyone!

    I would like to "concatenate" many columns with missing values in one. Below is an example of my subset:

    A B C D

    1 . . .
    . 2 . .
    . . 3 .
    . . . 4


    What I would like is to "merge" from variables A to D in order to have a variable Z :

    Z

    1
    2
    3
    4

    Any help would be greatly appreciated, thank you.

  • #2
    Code:
    egen Z= rowmax(A-D)

    Comment


    • #3
      That's exactly what I needed! Thanks a lot.

      Comment

      Working...
      X