Arrays / Vector equivalent in Stata

SPi

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).

Roberto Ferrer

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

R equivalent of Stata *

From Dev

Is there a fread() equivalent for working with vector<char>s or char arrays?

From Dev

Is there a fread() equivalent for working with vector<char>s or char arrays?

From Dev

is there an equivalent to Stata's egen function?

From Dev

pandas equivalent of Stata's encode

From Dev

Stata function equivalent to group_concat

From Dev

R: Is there an equivalent of Stata's ibn. function?

From Dev

equivalent of vector<T> in Java

From Dev

Underscore equivalent of _.pick for arrays

From Dev

Creating a vector with unique observations from a variable in Stata

From Dev

Julia: Vector of Vector (Array of Arrays)

From Dev

is there a Vector Java class equivalent in javascript?

From Dev

Is there an equivalent of Android rotation vector in iOS?

From Dev

Equivalent of `outer` with list or vector output

From Dev

What is the equivalent to Stata's portmanteau (Q) test for white noise in R?

From Dev

What is the equivalent to Stata's portmanteau (Q) test for white noise in R?

From Dev

array of vectors or vector of arrays?

From Dev

Algolia filter equivalent to SQL IN for arrays?

From Dev

Post e(b) vector from a custom program in Stata

From Java

What is the memory layout of vector of arrays?

From Dev

Vector sum of multidimensional arrays in numpy

From Dev

C++ - Vector of Float Arrays

From Dev

Qt equivalent to boost::ptr_vector?

From Java

What is the equivalent of the join operator over a vector of Strings?

From Dev

Returning Vector in C++ equivalent to c#

From Dev

C++ vector, java array equivalent?

From Dev

equivalent of int[] + k on vector in c++

From Dev

Is there an equivalent to C++'s std::vector in PHP?

From Dev

What is equivalent type of vector<Point> and Mat in EMGU?

Related Related

  1. 1

    R equivalent of Stata *

  2. 2

    Is there a fread() equivalent for working with vector<char>s or char arrays?

  3. 3

    Is there a fread() equivalent for working with vector<char>s or char arrays?

  4. 4

    is there an equivalent to Stata's egen function?

  5. 5

    pandas equivalent of Stata's encode

  6. 6

    Stata function equivalent to group_concat

  7. 7

    R: Is there an equivalent of Stata's ibn. function?

  8. 8

    equivalent of vector<T> in Java

  9. 9

    Underscore equivalent of _.pick for arrays

  10. 10

    Creating a vector with unique observations from a variable in Stata

  11. 11

    Julia: Vector of Vector (Array of Arrays)

  12. 12

    is there a Vector Java class equivalent in javascript?

  13. 13

    Is there an equivalent of Android rotation vector in iOS?

  14. 14

    Equivalent of `outer` with list or vector output

  15. 15

    What is the equivalent to Stata's portmanteau (Q) test for white noise in R?

  16. 16

    What is the equivalent to Stata's portmanteau (Q) test for white noise in R?

  17. 17

    array of vectors or vector of arrays?

  18. 18

    Algolia filter equivalent to SQL IN for arrays?

  19. 19

    Post e(b) vector from a custom program in Stata

  20. 20

    What is the memory layout of vector of arrays?

  21. 21

    Vector sum of multidimensional arrays in numpy

  22. 22

    C++ - Vector of Float Arrays

  23. 23

    Qt equivalent to boost::ptr_vector?

  24. 24

    What is the equivalent of the join operator over a vector of Strings?

  25. 25

    Returning Vector in C++ equivalent to c#

  26. 26

    C++ vector, java array equivalent?

  27. 27

    equivalent of int[] + k on vector in c++

  28. 28

    Is there an equivalent to C++'s std::vector in PHP?

  29. 29

    What is equivalent type of vector<Point> and Mat in EMGU?

HotTag

Archive