dropDeadEdges: Get rid of some 'dead' edges or nodes

View source: R/dropDead.R

dropDeadEdgesR Documentation

Get rid of some 'dead' edges or nodes

Description

The functions dropDeadEdges and dropDeadNodes are used to remove 'dead edges' and 'dead nodes'.

Usage

dropDeadEdges(x, thres)

Arguments

x

a valid gGraph.

thres

a numeric value indicating the threshold cost for an edge to be removed. All costs strictly greater than thres will be removed.

Details

Dead edges are edges associated to a prohibitive cost, that is, edges that no longer imply connectivity between two nodes.

Dead nodes are nodes that are not connected to any other node, thus not having any role in the connectivity of a graph.

Value

A gGraph object.

Examples

## Not run: 
plot(worldgraph.10k, reset = TRUE)
x <- dropDeadNodes(worldgraph.10k)
plot(x)

## End(Not run)


thibautjombart/geograph documentation built on Jan. 27, 2024, 10 p.m.