Hi guys

I have 15000 observations across 7 variables.

I need some help with the code to generate all possible unique combinations of variables.

e.g. if I had 2 variables and 4 observations per variables

V1=a,b,c,d

V2=1,2,3,4

Then, combinations = a 1, a 2, a 3, a 4,b 1, b 2, b 3, b 4, c 1, c 2, c 3, c 4, d 1, d 2, d 3, d 4

Instead of 2 variables and 4 observations, I have 7 variables and 15000 observations

Could someone help please?

Thank you

I have 15000 observations across 7 variables.

I need some help with the code to generate all possible unique combinations of variables.

e.g. if I had 2 variables and 4 observations per variables

V1=a,b,c,d

V2=1,2,3,4

Then, combinations = a 1, a 2, a 3, a 4,b 1, b 2, b 3, b 4, c 1, c 2, c 3, c 4, d 1, d 2, d 3, d 4

Instead of 2 variables and 4 observations, I have 7 variables and 15000 observations

Could someone help please?

Thank you

Last edited: