**240**wrote:

Hi.

Given a matrix that describes the edges' and their weights of a connected graph (see below) I want to extract a subgraph based on a threshold value **x** for the edges' weights. In literature, I read that one can search for the **maximal x**, such that the induced subgraph is connected. Since the initial graph is assumed connected, there must be a critical threshold **x-critical** that the extracted subgraph is connected for any **x <= x-critical**.

I was wondering how can this implemented in R. For example, my matrix (`weights.matrix`

) looks like

```
| FROM | TO | WEIGHT |
| A | B | 0.0042 |
| A | V | 0.23 |
| G | W | 0.82 |
| ... | ...| ... |
```

and I'm creating the whole graph, by using the `igraph`

package like

```
g <- igraph::graph_from_data_frame(weights.matrix, directed = TRUE)
```

Is there any way to check repeatedly using a different threshold value for the weights from min() to max() if the occurred graph is connected? I searched in google for such feature in `igraph`

but couldn't find anything helpful. So any idea on how to implement this idea is welcome.