Statalist The Stata Listserver

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

st: AW: new variable based on row numbers

From   Gawrich Stefan <>
To   "''" <>
Subject   st: AW: new variable based on row numbers
Date   Fri, 2 Mar 2007 17:35:19 +0100

> 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. 


gen x = _n

Stefan Gawrich
Hesse Health State Office 
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index