Learn R Programming

nda (version 0.3.0)

plot.nda: Plot an NDA Association Network

Description

Creates a printable static grid or interactive visNetwork network object. Assignment does not draw; printing the result draws it. The legacy igraph renderer remains available explicitly. Communities use a light qualitative node palette by default.

Usage

# S3 method for nda
plot(x, cuts = 0.3, interactive = FALSE, edgescale = 1,
    labeldist = -1.5, show_weights = FALSE, shapes = NULL,
    shape = "automatic", static.engine = c("grid", "igraph"),
    edge.color.links = TRUE, edge.colors = NULL,
    positive.color = "#009E73", negative.color = "#C62828",
    neutral.color = "grey65", positive.lty = 1, negative.lty = 1,
    neutral.lty = 1, edge.width.range = c(1, 6),
    edge.label.size = 10, edge.label.color = "#333333",
    edge.label.background = "#FFFFFFE6", edge.label.offset = 0.022,
    vertex.label.size = 12, vertex.label.color = "automatic",
    node.border.color = "#25313C",
    layout = "nicely", igraph_args = list(), visnetwork_args = list(), ...)

Value

An object of class nda_plot; print it to render.

Arguments

x

An nda object.

cuts

Minimum squared correlation, or a two-value retained range. For association-matrix models a scalar is interpreted relative to the nonzero minimum and maximum.

interactive

Create a visNetwork widget instead of a static graph.

edgescale

Edge-width multiplier.

labeldist

Static vertex-label distance.

show_weights

Label edges with unsquared correlations for row-level models and supplied similarities for association-matrix models.

shape

"automatic" uses one common rectangle for every indicator. Alternatively, supply one shape or one shape per node. Community membership is shown by colour, not shape.

shapes

Backward-compatible alias for shape.

static.engine

Static renderer. The default "grid" renderer uses layered labels with opaque backgrounds; "igraph" retains the legacy renderer.

edge.color.links

Colour links by the sign of the unsquared association.

edge.colors

Optional legacy low/middle/high colour scale. When NULL, positive, negative, and zero associations use the three explicit colours below.

positive.color,negative.color,neutral.color

Default signed edge colours.

positive.lty,negative.lty,neutral.lty

Line types for signed edges. All are solid by default.

edge.width.range

Minimum and maximum edge widths. Absolute association magnitude is rescaled to this interval.

edge.label.size,edge.label.color,edge.label.background,edge.label.offset

Edge-label appearance, background, and perpendicular displacement from the edge.

vertex.label.size,vertex.label.color

Vertex-label appearance. The "automatic" colour selects black or white for readable contrast.

node.border.color

Node-border colour.

layout

An igraph layout suffix such as "nicely", "fr", or "circle".

igraph_args

Named legacy static plot arguments, used when static.engine = "igraph".

visnetwork_args

Named lists called network, nodes, edges, options, interaction, and layout, forwarded to matching visNetwork functions.

...

Additional legacy static plot.igraph arguments.

Examples

Run this code
fit <- ndr(swiss)
p <- plot(fit, interactive = FALSE, show_weights = TRUE)
p

Run the code above in your browser using DataLab