This function builds a graph using a `dist`

object and a cut-off distance beyond which individuals are no longer connected. It also identifies clusters of connected individuals from the graph. If no cut-off is provided, a histogram is displayed for interactive selection.

vimes_prune(x, cutoff = NULL, graph_opt = vimes_graph_opt(), ...)

## Arguments

- x
- pairwise distances stored as a
`dist`

object.
- cutoff
- a cutoff distance beyond which individuals will not be connected in the graph.
- graph_opt
- a list of graphical options for the graphs, as
returned by
`vimes_graph_opt`

.
- ...
- further arguments to be passed to
`hist`

.

## Value

a list containing:

- graph
- a graph connecting individuals, weighted with the
input distances, with
`igraph`

class (from the `igraph`

package).
- clusters
- a list providing cluster information: group
membership, cluster sizes, and the number of clusters (K)

## Details

The cutoff is inclusive: only cases strictly further away
than the cutoff distance will be disconnected on the graph. Note
that this differs from the original `gengraph`

implementation
in the package `adegenet`

.

## See also

the function `gengraph`

in the package `adegenet`

, which
was an initial implementation of the same idea in a genetics
context.