graphDensity {KEGGgraph} | R Documentation

## Graph density

### Description

The graph density is defined as d = E/(V*(V-1)/2) where E is the number of edges and V of nodes.

### Usage

    graphDensity(graph)

### Arguments

`graph` | A graph object

### Details

The density of a graph lies between [0,1]

### Value

A value between [0,1]

### Author(s)

Jitao David Zhang jitao_david.zhang@roche.com

### References

Aittokallio and Schwikowski (2006), Graph-based methods for analysing networks in cell biology, Briefings in Bioinformatics, 7, 243-255.

### Examples

    tnodes <- c("Hamburg","Dortmund","Bremen", "Paris")
    tedges <- list("Hamburg"=c("Dortmund", "Bremen"),
    "Dortmund"=c("Hamburg"), "Bremen"=c("Hamburg"), "Paris"=c())
    tgraph <- new("graphNEL", nodes = tnodes, edgeL = tedges)
    graphDensity(tgraph)

[Package KEGGgraph version 1.40.0 Index]