Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Please make sure you can reproduce my above example. Then try to create your own reproducible(!) example, that demonstrates the problem. You might be interested in dataex for this purpose.

    Best
    Daniel

    Comment


    • #17
      wow! I followed your final changes and it finally worked. Thank you so much. Sounds like the problem was using v instead of var and using local varlist instead of local vars in this part of the code:
      Code:
      foreach v of local vars {
              local label : subinstr local element "`id'" ""
              label variable `v' `"`label'"'
        }
      changed to

      Code:
       foreach var of local varlist {
              local label : subinstr local element "`id'" ""
              label variable `var' `"`label'"'
          }
      Thanks again

      Comment


      • #18
        Good to hear that it works, but the reason you have in mind cannot possibly be the cause. Both are valid syntax and do the very same thing. It might have to do with filling in the "wrong" local before the loop starts.

        Best
        Daniel

        Comment

        Working...
        X