Iwan Barankay wrote
> I did some data cleaning and was generating variables.
> Doing so I found out that expressions can not contain more than 66
> dyadic operators (return code 130). This is quite frustrating in large
> data sets when, for example, using replace with many if conditions.
> So to debug one hase to split command lines.
> It's not a real problem, but did anyone else faced this constraint?
> Do you know if there are plans at STATA to relax the constraint?
Did you tried the inlist() function? This function makes complicated
if-conditions very often much shorter and may help you to circumvent your
proplem. For example, instead of typing
gen newvar = 1 if oldvar==1 & oldvar==7 & oldvar==13 & oldvar==15 & oldvar==27
you can type
gen newvar = 1 if inlist(oldvar,1,7,13,15,27)
Also consider the inrange()-function. See -help functions- for more on
inlist() and inrange()
uli
*
* 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/