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

RE: st: Placing the content of 3 cells in 1 new cell?

From   "Nick Cox" <>
To   <>
Subject   RE: st: Placing the content of 3 cells in 1 new cell?
Date   Mon, 5 Nov 2007 14:42:21 -0000

This is true, but the wrong way round. My -catenate- was superseded by
my   -egen, concat()- which then become official. Svend mentioned the

Thus there is no need to install yet another user-written command when
exactly the same functionality (indeed more, if I recall correctly) is
already in official Stata. 

So why, you may ask, is -catenate- still available on SSC? Well, 
SSC is an archive and much stuff is there because it might be used
within other programs or do files, and/or be useful to people still
using old Statas. Over time the number of users may become very small,
including zero, but old stuff usually does no harm. 


Carter Rees

Nick Cox's -catenate- automates the generate command suggested by Svend.

ssc install catenate

catenate Drugs = Drug1 Drug2 Drug3, p(/)

Svend Juul

Ziad wrote:

In Excel the person can have the content of 3 other cells in one cell,
for example

Drug1        Drug2         Drug3         Drugs
Panad        Asp          Val            Panad/Asp/Val

by typing:

Is it possible to do something similar in STATA?


   generate drugs = drug1 + "/" + drug2 + "/" + drug3
   egen drugs = concat(drug1-drug3), punct(/)

*   For searches and help try:

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