Daniel M�ller
>
> I would like to insert observations (format: %12s) of one
> variable of a file with 10 obs <head.dta> at the beginning
> of several variables (converted to strings) of another file
> <boss.dta> and shift the remaining observations from
> <boss.dta> these 10 obs back. I appended <head.dta> to
> <boss.dta>, then replaced every empty observation at the end
> of <boss.dta>. But here I get stuck. How can I efficiently
> put the string variables from the end to the beginning?
>
> P.S.: Speed is an issue as <boss.dta> has 1.7 mio obs!
In the last sentence, Daniel means "observations" not
variables (pers.comm.).
gen long which = cond(_n <= 10, _N + _n, _n)
sort which
Nick
[email protected]
*
* 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/