Announcement

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

  • ordering variables by using the variables window

    Hi there - I often find that a quick way to order variables is to shift them around using the "variables" window. However, I understand that this is only a cosmetic order and doesn't actually alter my dataset. Is there an easy way to take the order in the variables window and 'save' it by using a command?

    Thanks

  • #2
    Tim,

    After reordering your variables in the window, could you select all in the variables window and paste the varlist in an -order- code? On my end, the select all and copy method preserves the new order.

    I'm not sure if there is command to grab the order from the variables window, though, without user input.
    Last edited by Roger Chu; 18 Jan 2017, 11:49. Reason: Typo.

    Comment


    • #3
      Great idea - and it works - thanks!

      Comment


      • #4
        A few examples with - order - may be checked here: http://www.stata.com/manuals13/dorder.pdf
        Best regards,

        Marcos

        Comment


        • #5
          Marcos: It makes no difference in most cases but referring to the latest version of the manuals should be standard.

          http://www.stata.com/manuals14/dorder.pdf

          Fact: everyone can access them online regardless of their update status.

          Of course, if anyone uses Stata 13 or earlier, you may need to check with your Stata what's available.

          Comment


          • #6
            Thanks for the information, Nick. Indeed, I just "googled" it on the spur of the moment, during a pause for conection in a trip, and this link came first.

            I absolutely agree that it's best to share the link of the new version.

            Thank you again.
            Best regards,

            Marcos

            Comment

            Working...
            X