This is true, but the wrong way round. My -catenate- was superseded by
my -egen, concat()- which then become official. Svend mentioned the
latter.
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.
Nick
[email protected]
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:
drugs=drug1&"/"&drug2&"/"drug3
Is it possible to do something similar in STATA?
-----------------------------------------------------------------
yes:
generate drugs = drug1 + "/" + drug2 + "/" + drug3
or:
egen drugs = concat(drug1-drug3), punct(/)
*
* 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/