Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: move


From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: move
Date   Thu, 04 Jul 2013 09:04:57 -0400

To Sergiy:
Thanks very much for that very helpful answer.
I'm glad to know that these features have been made available, though not to us who have yet to upgrade.
Meanwhile, I now understand how I can program them.
Best wishes,
--David

At 02:24 AM 7/4/2013, Sergiy Radyakin wrote:
David, you don't have to always specify the full list of variables
after order. This code places turn immediately before and foreign
immediately after mpg:

sysuse auto
describe
order turn,before(mpg)
order foreign,after(mpg)
describe

However this feature appeared first in Stata 11 and is not available
directly in Stata 10. It doesn't mean that it can't be programmed
there.

Compare:
http://www.stata.com/help10.cgi?order
http://www.stata.com/help11.cgi?order


Best, Sergiy Radyakin

On Wed, Jul 3, 2013 at 6:39 PM, David Kantor <[email protected]> wrote:
> Hi.
> I have been using -move-, and it seemed to behave oddly, until I began to
> understand what it means when they wrote:
>         move relocates varname1 to the position of varname2 and shifts the
> remaining variables,
>         including varname2, to make room.
> I find that it cyclically rotates the set of variables in the range spanning
> from varname1 to varname2. Thus, varname1 will end up
> after varname2 if it was originally before it, and vice-versa.
>
> That seems inconsistent; or, it presents a problem in relation to my goal. I
> want to place varname1 after (or before) varname2, regardless of where it
> comes from.
> Is there a way to do this?
> I prefer not to use -order-, as the set of variables is somewhat large, and
> I want to place certain variables after one that is
> somewhere near the middle. (I would need to spell out a long list of names.)
>
> I use Stata 10. Is there greater capability for controlling this operation
> in Stata 11, 12, or 13?
>
> Thanks
> --David

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index