Being familiar with R, I'm wondering what is the Stata equivalent of vectors (e.g. var<-c(1,2,3,4)
)?
I know that Stata uses macros, but I don't get how you can store multiple values in one macro (create an array type of macro).
I want to loop over some strings and use them as patterns for matching regular expressions, like with subinword(columnA,pattern,"substitute",1)
.
Macros are flexible creatures and they may be able to help you with whatever it is you want to do (it's not clear). This contains some nice explanations
http://www.ssc.wisc.edu/sscc/pubs/stata_prog1.htm
For array-like structures composed with macros, see for example,
http://www.stata.com/support/faqs/data-management/implement-sas-arrays/
You also mention regular expressions which Stata covers with regex
functions (as already suggested in a previous answer).
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments