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(), ...)


pairwise distances stored as a dist object.
a cutoff distance beyond which individuals will not be connected in the graph.
a list of graphical options for the graphs, as returned by vimes_graph_opt.
further arguments to be passed to hist.


a list containing:

a graph connecting individuals, weighted with the input distances, with igraph class (from the igraph package).

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


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.