Description Usage Arguments Details Value Author(s) Examples
remove self loops in a graph
1 |
g |
one instance of the |
If a given graph contains self-loop(s), removeSelfLoops
removes them.
This is for those functions that cannot handle graphs with self-loops.
A new graph without self loops.
Li Long <li.long@isb-sib.ch>
1 2 3 4 5 6 | con <- file(system.file("XML/dijkex.gxl",package="RBGL"))
g1 <- fromGXL(con)
close(con)
g2 <- ugraph(g1)
removeSelfLoops(g2)
|
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which.max, which.min
A graphNEL graph with undirected edges
Number of Nodes = 5
Number of Edges = 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.