Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Inserting a row in the data table


From   "Sebastian F. Büchte" <sfbuechte@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Inserting a row in the data table
Date   Thu, 20 Sep 2007 13:21:26 +0200

Kartick

looking at your example it seems more to be a sort problem. Try

gsort ABC, mfirst

This will sort your data by entries in ABC in ascending order with
missing values first.

If you would like to add observations to a dataset, you could use
-expand-. This command allows you to add extra observations by copying
existing ones, e.g., expand 2 in 1 will append a full copy of your
dataset's first observation and append it to the very end of the
dataset. Find out more about -expand- with -help expand-.

Sebastian



2007/9/20, Kartick Gupta <kartick@mngt.waikato.ac.nz>:
> Hello all,
> Is it possible to insert a row in the data table? I know it is possible by running some simple program, but is there any function already available in Stata?
>
> For example,
>
>    ABC      --change to--->          ABC
> 1   x                                            .
> 2   y                                            x
> 3   z                                            y
> 4   .                                             z
>
> Regards
> Kartick
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index