Hello, this is my first post here in the SAS forums! I have a data set which requires a manipulation that I am unable to figure out how to do. It's set up like this: fruit count day apples 500 1 apples 300 3 apples 505 5 apples 487 7 oranges 36 1 oranges 39 5 oranges 42 7 pears 17 1 pears 16 2 pears 13 3 pears 21 5 pears 27 6 What I need to do is find the difference in number of fruit on each day from the first day. So for apples, I need to calculate the difference in # of apples between days 1 and 3, 1 and 5, 1 and 7. For oranges, days 1 and 5, 1 and 7, etc. The difference on each day will be stored in a new variable. Can anyone help with this? Or provide suggestions? I do most of my work in R, and trying to do this in SAS is obviously not the same.
... View more