Announcement

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

  • Identify all String Variables in a Dataset

    Hi there,

    I'd like to identify all string variables in a dataset and put the names of those string variable in a local so I can use them in a forloop. What's a good way of doing this?

    Thanks,
    Erika




  • #2
    Code:
    ds, has(type string) 
    local strvars "`r(varlist)' 
    
    
    * or -search findname- and install it from Stata Journal site 
    
    findname, type(string) local(strvars)

    Comment


    • #3
      Thank you for the very quick response, and helpful suggestions.

      Best,
      Erika

      Comment

      Working...
      X