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

Re: st: combining two text cells into one cell

From   Michael McCulloch <>
Subject   Re: st: combining two text cells into one cell
Date   Sat, 4 Oct 2008 11:09:47 -0700

Hello Dahlia,
You could try:
-------begin example--------
set obs 3
gen var1="Microsoft"
gen var2="Gates"
gen var3=var1+", "+var2
-------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,

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.
*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2023 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index