I have a square matrix M in R whose all entries all real numbers lying between 0.5 to 1.9. I want to make adjacency matrix by imposing a condition that whenever each element is less than 0.6 then that element should replace by zero other wise element should replace by 1. This i want to do for all 141 threshold in `seq(0.5, 1.9, 0.01)`

so that i can get 141 adjacency matrices. How can I get this? and how can I save or print all those matrices in R? Any help will be appreciated. Kindly bear with my poor knowledge in R :-)

# Best How To :

You could use `lapply`

to loop over the values of "Seq1", create the binary matrix (`(M>=x)+0L`

) and store it in a list ("lst")

```
lst <- lapply(Seq1, function(x) (M >=x)+0L)
length(lst)
#[1] 141
```

### data

```
Seq1 <- seq(0.5, 1.9, 0.01)
set.seed(24)
M <- matrix(sample(Seq1, 10*10, replace=TRUE), ncol=10)
```