Here is a simple example of my problem:
> df <- data.frame(ID=1:10,Score=4*10:1) > df ID Score 1 1 40 2 2 36 3 3 3
diff wants a matrix or a vector rather than a data frame. Try
data.frame(diff(as.matrix(df)))