Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: concat num var


From   Richard Goldstein <richgold@ix.netcom.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: concat num var
Date   Mon, 21 Oct 2002 15:47:30 -0400

You don't say what you need this for; however,
if the end result does not have to be numeric,
I strongly recommend first changing each 
variable to a string and then concatenating.

Rich

"Wentworth, Seyda" wrote:
> 
> Hi,
> What is the easiest way to concat 4 numerical variables, each of various
> lengths (3-9). I tried :
> 
> egen newvar=concat(var1 var2 ...)
> 
> but got a newvar (16 to 18 digits) displayed in exponential format when it's
> longer than 16 digits, which I don't want. I tried to change the storage
> type and display format but wasn't able to see all 17 or 18 digits.
> Thanks.
*
*   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