Statalist The Stata Listserver


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

st: RE: new variable based on row numbers


From   "Mak, Timothy" <Timothy.Mak@iop.kcl.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: new variable based on row numbers
Date   Fri, 2 Mar 2007 16:36:27 -0000

gen index = _n

Tim  

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of
nora@uchicago.edu
Sent: 02 March 2007 16:34
To: statalist@hsphsun2.harvard.edu
Subject: st: new variable based on row numbers

Hello all,
I am having trouble figuring out how to create a new variable based on
the row numbers of my data. I just want to create a sequentially
numbered variable (x, x+1, x+2 ect...) to uniquely identify each row of
my data.

There is probably a real quick and simple solution to this, I just
haven't yet found it. Can anyone point me in the right direction?

Thanks

Eleanor Friedman
*
*   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