Announcement

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

  • #16
    Not a problem, Nick. Here's the code followed by the error message:

    . forval i = 1/`N_names' {
    2. mata: st_local("eachname", name[`i'])
    3. replace disciplinecomments = subinword (disciplinecomments, "`eachname'", "", .)
    4. }
    invalid syntax
    r(198);

    For all of the preceding code that Mike provided, I simply edited the text according to my needs.

    I'm using an up-to-date version of Stata 13.1.

    Comment


    • #17
      I'd try subinword( and not subinword (.

      Comment


      • #18
        For what it's worth: I just successfully ran my code on some sample data from Robert's posting, and after removing the errant space after -subinword-, per Carole's comment. - Mike

        Comment


        • #19
          Thanks, everyone, for your help. As always, you prove that Statalist is an invaluable resource. Cheers!

          Comment

          Working...
          X