I have a list of matrices, the first matrix of which looks as follows:

```
$x

[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] 
[1,]    1    1    1    1    1    1    1    1    1     1     1     1     1     1     1     
[2,]    1    1    1    0    0    0    0    0    0     0     0     0     0     0     0     
[3,]    0    0    0    0    0    0    0    1    1     1     1     0     0     0     0     
[4,]    1    1    1    1    1    1    1    1    0     0     0     0     0     0     0

```

I am trying to create a new matrix of the same dimensions that will indicate the difference in value between the first number of each row and each successive number. Id like to use `abs()` to make this value be the absolute value of this difference. Thus, in the example above, the expected result would be:

```
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] 
[1,]    0    0    0    0    0    0    0    0    0     0     0     0     0     0     0     
[2,]    0    0    0    1    1    1    1    1    1     1     1     1     1     1     1     
[3,]    0    0    0    0    0    0    0    1    1     1     1     0     0     0     0     
[4,]    0    0    0    0    0    0    0    0    1     1     1     1     1     1     1

```

I know that I can use `apply` to see the difference between the first and last columns:

```
abs(apply(x,1,diff, lag=15))
[1] 0 -1 0 -1

```

However, I am not sure how to make this an iterative process in which the lag is increased from 1 to 15 to capture the information for the entire matrix. I also have some NAs in my original matrix, which id like returned as NA in the new matrix.

Ultimately, Id like to use the solution with `sapply` to apply it across my entire list comprised of 500 matrices like the one in the example.