Learn R Programming

hierformR (version 0.1.0)

delete_isolates: Delete isolated nodes from network

Description

Delete isolated nodes from network

Usage

delete_isolates(q)

Arguments

q
an igraph object

Value

an igraph object containing only connected nodes

Examples

Run this code
g=igraph::graph.edgelist(cbind(a=c(1,2,3,4), b=c(3,1,1,4)),directed=TRUE)
delete_isolates(g)

Run the code above in your browser using DataLab