[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: For loop with wildcards for string suffixes
I'm trying to figure out the syntax for generating interaction
variables using wildcards for suffixes.
I have variables PhoneAA PhoneBB PhoneCC Phone DD and PreferenceAA
PreferenceBB PreferenceCC and Preference DD.
I'd like to generate the interaction variable that would occur from a
product of these two vectors:
PhonePrefAA=PreferenceAA*PhoneAA, PhonePrefBB=PreferenceBB*PhoneBB, etc.
The problem is that I have many of these types of variables and six
suffixes, and I don't want to type out all the suffixes individually.
Is there a way I can do this using a for loop?
* For searches and help try: