I have two datasets, one of them contains numeric variables, and the other one contains some conditions on which these numeric variables should be split. Let's say, the first dataset would look like this:
var1 var2
1 12
8 4
And the other one:
varname condition group
var1 var1 < 5 1
var1 var1 >= 5 2
var2 var2 < 6 1
var2 var2 >= 6 2
Then the output dataset would look like:
var1 var2 var1_cat var2_cat
1 12 1 2
8 4 2 1
If i had to deal with any of "standard" programming languages, I'd just use a nested iteration. However SAS and it's data step logic is so far quite unfamiliar to me.
Any help will be aprreciated.