Suppose I have the following simplified distribution:

    time | value
    1    | 2
    2    | 4
    3    | 8
    4    | 16

    1    | 1
    2    | 3
    3    | 9
    4    | 27

    1    | 40
    2    | 20
    3    | 10
    4    | 5

    1    | 12
    2    | 1
    3    | 99
    4    | 23423

These are all part of the same dataset (so one x can have multiple values here, eg. time = 1 corresponds with value = 2,1,40,12). I separated them because the first 3 have an obvious pattern within their slope (2, 3 and 0.5) and the last does not have a pattern in its slope. Time is in days, and the values represent a quantity.

Now, how do I use SPSS to find the elements of a distribution that together form a pattern (any kind of pattern) in their slope? And how can I make it also include elements that almost follow this pattern, but have slight variations (a variation that I can set)?

Any feedback is appreciated. Thanks.

**Update:**

It looks like SPSS is not the best tool for the task. I am interested in the R language however.

If anyone could recommend any books regarding this field of pattern recognition in R, that would be great.