Hi all,
I would like to use loop to sum up every two continuous spending and opt out any ID with sum less than 50. Data as below. (S stands for Spending)
ID S1 S2 S3 S4 S5
1 20 10 30
2 10 120 25 35
3 16 23 102 20 5
4 15 28
5 70 32 13 18
Any suggestions would be greatly appreciated!