Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Right to Left Column Cascade or Adjustment


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Right to Left Column Cascade or Adjustment
Date   Tue, 24 May 2011 11:15:35 -0500

You could use Jeffrey Arnold's -sortrows- (use -findit- to locate download).

input col1 col2 col3 col4 col5
101 101 . . .
. 111 333 . .
. . . . 935
. . . 23 16
405 .295 . .
end
l
sortrows, replace
l

Scott


On Tue, May 24, 2011 at 10:08 AM, David Torres <torresd@umich.edu> wrote:
>
> There's probably a proper name for the process I'd like to carry out.
>
> Say I have five columns of information with staggard cell inputs.  How do I go about moving all the information in a subsequent column back through to the first column for which no information is missing on the row?
>
> I'd like to go from something like this:
>
> Col1   Col2     Col3    Col4    Col5
>
> 101     101
>        111      333
>                                 935
>                        023      016
> 405              295
>
>
> to something like this
>
> Col1   Col2     Col3    Col4    Col5
>
> 101     101
> 111     333
> 935
> 023     016
> 405     295
>
>
> Thanks,
> Diego
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index