Learn R Programming

cograph (version 1.5.2)

compute_adaptive_esize: Compute Adaptive Base Edge Size

Description

Calculates the maximum edge width that decreases with more nodes. Inspired by qgraph but scaled for line widths (not pixels).

Usage

compute_adaptive_esize(n_nodes, directed = FALSE)

Value

Numeric maximum edge width (suitable for lwd parameter).

Arguments

n_nodes

Number of nodes in the network.

directed

Whether the network is directed (directed networks use thinner edges).

Details

The formula produces reasonable line widths:

  • 3 nodes: ~5

  • 10 nodes: ~4.5

  • 50 nodes: ~3

  • 100 nodes: ~2

  • 200 nodes: ~1.2

For directed networks, the size is reduced by 30% (minimum 1).