I got stuck while working on trends. My problem is similar to this below thread but I have one extra variable called 'item'. 

[How to determine trend of time-series of values in R](https://stackoverflow.com/questions/23600385/how-to-determine-trend-of-a-series-of-values-in-r)

My end result would be like below sample. Please help

```
Customer_ID Item    Sales_Slope  
Josh        milk      Positive
Josh         eggs      Negative
Eric         milk      Mixed
Eric         eggs      postive

```

My Data:

```
require("data.table")
dat <- data.table(
            customer_ID=c(rep("Josh",6),rep("Ray",7),rep("Eric",7)),
            item=c(rep("milk",3),rep("eggs",3),rep("milk",4),rep("eggs",3),rep("milk",3),rep("eggs",4)),
            sales=c(35,50,65,65,52,49,15,10,13,9,35,50,65,65,52,49,15,10,13,9))

dat[,transaction_num:=seq(1,.N), by=c("customer_ID")]

```