nDegreeDensities {BioNetStat} | R Documentation

## Density functions of the degrees of n graphs

### Description

'nDegreeDensities' estimates the density functions of the degrees for n graphs at the same coordinates

### Usage

    nDegreeDensities(Gs, npoints = 1024, bandwidth = "Sturges",
      from = NULL, to = NULL)

### Arguments

`Gs` | a list of n igraph graphs objects
`npoints` | number of points used in density function estimation
`bandwidth` | a parameters. It can be set to either "Sturges" or "Silverman".
`from` | the lower value used to build the distribution
`to` | the higher value used to build the distribution

### Value

a list containing the components 'x' and 'densities'. The first element is the vector 'x' of 'npoints' coordinates of the points where the density function i estimated, and the second is a vector 'y' of the estimated density values.

### See Also

`graph.strength`

`density`

### Examples

    G<-list()
    G[[1]]<-erdos.renyi.game(30,0.6)
    G[[2]]<-barabasi.game(30,power = 1)
    G[[3]]<-watts.strogatz.game(2,30,2,0.3)
    d<-nDegreeDensities(G, npoints=1024, bandwidth="Sturges")
    par(mfrow=c(1,3))
    plot(d$x,d$densities[,1],main="Erdos-Renyi\n Degree distribution",
    xlab="Degree",ylab="Frequency")
    plot(d$x,d$densities[,2],main="Barabasi\n Degree distribution",
    xlab="Degree",ylab="Frequency")
    plot(d$x,d$densities[,3],main="Watts-Strogatz\n Degree distribution",
    xlab="Degree",ylab="Frequency")

[Package BioNetStat version 1.7.0 Index]