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/