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: how to repeat a value?


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: how to repeat a value?
Date   Thu, 14 Jul 2011 23:59:47 +0100

See also

http://www.stata.com/support/faqs/data/missing.html

Nick



On 14 Jul 2011, at 20:43, Richard Goldstein <[email protected]> wrote:

-replace var_name=var_name[_n-1] if var_name==""-

Rich

On 7/14/11 3:35 PM, Kresten Buch wrote:
Dear Stata experts,

I have a table generated from a website with two colums as below.

id    var_name
-------------------------
.    Area
185
187
190
201
.    Population
185
201
210
217
.    Education
165
167

And I would like to make it look like this version here below.

id    var_name
-------------------------
.    Area
185    Area
187    Area
190    Area
201    Area
.    Population
185    Population
201    Population
210    Population
217    Population
.    Education
165    Education
167    Education

I hope I explained myself?
Been looking for a answer for hours. Hope some of you can help me. Im
quite new to stata.

Thanks in advance
Kresten Buch
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index