Learn R Programming

migraph (version 0.8.13)

autographr: Quickly graph networks with sensible defaults

Description

The aim of this function is to provide users with a quick and easy graphing function that makes best use of the data, whatever its composition.

Usage

autographr(
  object,
  layout = "stress",
  labels = TRUE,
  node_color = NULL,
  node_group = NULL,
  node_shape = NULL,
  node_size = NULL,
  ...
)

Arguments

object

A migraph-consistent object.

layout

An igraph layout algorithm, currently defaults to 'stress'.

labels

Logical, whether to print node names as labels if present.

node_color

Node variable in quotation marks to be used for colouring the nodes.

node_group

Node variable in quotation marks to be used for drawing convex but also concave hulls around clusters of nodes. These groupings will be labelled with the categories of the variable passed.

node_shape

Node variable in quotation marks to be used for the shapes of the nodes. Shapes will be follow the ordering "circle", "square", "triangle", so this aesthetic should be used for a variable with only a few categories.

node_size

Node variable in quotation marks to be used for the size of the nodes. This can be any continuous variable on the nodes of the network. Since this function expects this to be an existing variable, it is recommended to calculate all node-related statistics prior to using this function.

...

Extra arguments.

Examples

Run this code
# NOT RUN {
autographr(ison_coleman)
autographr(ison_karateka)
# }

Run the code above in your browser using DataLab