powered by
Prune a graph
prune_sg(g, level = 1, verbose = FALSE)
sg object
pruning level
verbosity
Remove edges from a graph by their path connectivity.
x <- matrix(runif(50*2), ncol=2) g <- spatgraph(x, "MST") gp <- prune_sg(g, level = 2) plot(g, x, lty=2) plot(gp, x, add=TRUE, col=2)
Run the code above in your browser using DataLab