node_degrees: Investigate the degree distribution of a network graph

View source: R/network-investigate.R

node_degreesR Documentation

Investigate the degree distribution of a network graph

Description

Plot the node-degree distribution and fit its log-log slope, for example as a diagnostic for assessing whether a network has a scale-free-like degree distribution. The returned exponent is the negative fitted slope.

Usage

node_degrees(
  net = NULL,
  main = "Node degree distribution",
  plot = TRUE,
  legend = TRUE,
  case_sensitive = FALSE,
  normalize = FALSE,
  nea = NULL,
  plot_type = c("points", "smooth")
)

connectivity(...)

Arguments

net

Undirected igraph network, or a legacy network with a named adjacency list in links and edge count in Ntotal.

main

Plot title.

plot

Draw the plot.

legend

Show network summary information.

case_sensitive

Identifier case policy used when normalize = TRUE.

normalize

Re-normalize network node identifiers. The default is FALSE because networks are normally normalized during import. Enabling this option warns because it copies and processes the full adjacency data.

nea

Deprecated compatibility alias for net.

plot_type

Plot the observed degree frequencies as ordinary points or as a smoothed density raster using graphics::smoothScatter(). The smoothed plot requires the suggested KernSmooth package.

...

Arguments passed by the deprecated connectivity() alias.

Value

Invisibly, the fitted exponent, with model and data attributes.

References

Clauset A, Shalizi CR, Newman MEJ (2009). Power-law distributions in empirical data. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1137/070710111")}.

See Also

topology_2nd(), network_overlap(), nea_member_recovery_benchmark()

Examples

data("NEArender.test")
net <- NEArender.test$NET$STRING.300K
exponent <- node_degrees(net, plot = FALSE)
attr(exponent, "data")

NEArender documentation built on Nov. 28, 2026, 5:10 p.m.