1 1 0 0 0 0 1 1 1
1 1 1 1 0 0 0 0 1
0 1 1 0 0 1 1 1 1
1 1 1 1 1 1 0 1 1
Hi! I am having some trouble trying to count the dummies as individual sequences seperated by the 0's (such as in the datalines above). What I am trying to achieve, is have SAS count the dummies so that line 1 would count group 1 as having two elements, stop and group 2 as having three elements. I.e.: 1_1 1_2 0 0 0 0 2_1 2_2 2_3 I have tried to do this by generating the lines as arrays and looping through the groups with the "do until" function. However, I am wondering if there is any do-loop function that would allow me to loop "from" a point mid-array, so that I could begin a second loop from "2_1"? I hope this makes sense, any help is hugely appreciated! Thanks in advance. 🙂
... View more