Statalist The Stata Listserver


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

Re: st: Join String Variables


From   Robert A Yaffee <[email protected]>
To   [email protected]
Subject   Re: st: Join String Variables
Date   Sun, 19 Nov 2006 12:25:39 -0500

Socrates,
Try egen Var3=concat(Var1 Var2 Var3)
  Regards,
     Robert

Robert A. Yaffee, Ph.D.
Research Professor
Shirley M. Ehrenkranz
School of Social Work
New York University

home address:
Apt 19-W
2100 Linwood Ave.
Fort Lee, NJ
07024-3171
Phone: 201-242-3824
Fax: 201-242-3825
[email protected]

----- Original Message -----
From: Socrates Mokkas <[email protected]>
Date: Sunday, November 19, 2006 10:39 am
Subject: st: Join String Variables

> Hi People,
> 
> OK, I know how to split string variables but have not found a way 
> to join string variables. Did a search but could not source 
> something out. Can you direct me to a command? Or if not is there a 
> way round it. I just want to put two or more strings in one even if 
> missing values exist. For example,
> 
> obs     Var1     Var2    Var3       Var3
> 1          A        B       K        ABK
> 2                   C                  C
> 3          D               ED        BED
> 
> I have Var1 and Var2 and want to create Var3.
> Thanks a lot.
> 
> Socrates Mokkas
> *
> *   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index