Statalist


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

Re: st: combining two text cells into one cell


From   "Dalhia Mani" <[email protected]>
To   [email protected]
Subject   Re: st: combining two text cells into one cell
Date   Sat, 4 Oct 2008 13:43:35 -0500

Great. Thanks Michael.
Dalhia

On Sat, Oct 4, 2008 at 1:09 PM, Michael McCulloch <[email protected]> wrote:
> Hello Dahlia,
> You could try:
> -------begin example--------
> clear
> set obs 3
> gen var1="Microsoft"
> gen var2="Gates"
> gen var3=var1+", "+var2
> list
> -------end example--------
> The comma and space between the quote signs are optional.
> -gen- is an abbreviation for -generate-
> -set obs 3- makes a new dataset with 3 observations.
> Hope this helps,
> Michael
>
>
>
>
>> Hi, I want to combine two txt fields into one.  For example, one field
>> has company names such as "microsoft" and the other had owner name
>> such as "Gates", and I want a third field that will combine the two
>> cells and produce "microsoft Gates."  Can anyone tell me how I can do
>> this in stata?
>>
>> thanks. I appreciate your help.
>> dalhia
>> *
>> *   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/
>



-- 
Dalhia Mani
Department of Sociology
University of Minnesota
Office: 1052 Social Sciences
267 19th Avenue South, Minneapolis
MN 55455
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index