Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: RE: RE: ? loop [correction]


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: RE: ? loop [correction]
Date   Wed, 15 Oct 2003 15:51:42 +0100

Ganesh, Saravana
 
> I am not quite clear as what that extra space does as the 
> results seem to be the same?
> 
> > If you want to keep track of which are used, 
> > 
> > gen therapies = "" 
> > foreach v of var cya aza pred2 okt_p mmf tli { 
> > 	replace therapies = therapies + "`v'" if `v' == 2 
> > } 
> > 
> > tab therapies 
> 
> An extra space would help, i.e. "`v' " 

It should mean that you get (e.g.) "cya aza pred2 " 
rather than "cyaazapred2". The frequencies should 
be the same. 

Nick 
[email protected] 

*
*   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/



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