Announcement

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

  • Invalid name in foreach loop

    Hi all,

    I'm trying to iterate over two variables, with the names "category" and "month_created". The code is below. I'm getting the r(198) invalid name error and I'm not sure why. I'm a newbie to Stata and I've looked over all the documentation for foreach and local macros, but I can't find anything wrong. Any help would be appreciated!

    foreach var of varlist category month_created {
    tabulate 'var'
    }

  • #2
    Never mind! Found the syntactical error almost as soon as I posted.

    Comment

    Working...
    X