Code:
sysuse auto foreach var in weight price mpg rep78 { /*1. Tabulate the variable*/ tab `var' /*2. The no. of times this loop has iterated*/ local iteration_no = di `iteration_no' }
Code:
A tabulation of weight 1 A tabulation of price 2 A tabulation of mpg 3 A tabulation of rep78 4
0 Response to Get no. of times for loop has iterated
Post a Comment