neighborhood_plot {memnet} | R Documentation

## Neighborhood plot

### Description

Plot k-Neighborhood of given node containing all nodes with distances larger than k from given node.

### Usage

    neighborhood_plot(adj, names = NULL, node, k = 2,
      nod_col = "#E0EED4", nod_shading = TRUE, ...)

### Arguments

`adj` | numeric matrix representing the adjacency matrix. Can also be an object of class `"igraph"` or an edge list, i.e., a two-column `matrix` or `data.frame` containing specifying the edges start and end points.
`names` | optional character vector specifiying the node names.
`node` | integer specifying the row index (within the adjacency matrix) of the node whose the neighborhood should be plotted. Alternatively the node name.
`k` | integer specifying the size of the neighborhood. Specifically, the plot will contain all nodes that are `k` or fewer steps away from `v`.
`nod_col` | character vector of length 1 specifying the node colors.
`nod_shading` | logical specifying whether the node colors should be shaded as a function of the distance to `node`.
`...` | arguments to be passed to network_plot.

### Value

nothing. A plot is created in dev.cur.

### Examples

    ## Not run:
    # get fluency data
    data(animal_fluency)

    # edge list of fluency graph
    edge_list = threshold_graph(animal_fluency[1:40])

    # get adjacency matrix
    adj = edg_to_adj(edge_list)

    # plot
    neighborhood_plot(adj, node = 'dog', k = 2)

    ## End(Not run)

[Package memnet version 0.1.0 Index]