Announcement

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

  • variable renaming with values

    Hello,

    I have a series of variable names PID3, PID4, PID5...PIDn that I want to rename PID1, PID2, PID3...PIDn-2

    What's the best way to do this? I know I could by converting the varnames to values, splitting the columns, subtracting 2, and remerging the columns. Is there something a bit more elegant?

    Thanks for any help!

    Reese

  • #2
    Code:
    rename (PID#) (PID#) , renumber
    Best
    Daniel

    Comment


    • #3
      Perfect, thank you Daniel!

      Comment

      Working...
      X