annotate_network: Use grep to add a vector of annotations/colors to a network.

View source: R/network.R

annotate_networkR Documentation

Use grep to add a vector of annotations/colors to a network.

Description

The igraph syntaxes are a little clunky, but the set_attr() functions mostly make sense.

Usage

annotate_network(
  network,
  names,
  color = NULL,
  default = NULL,
  annot_name = "type",
  annot_value = "high"
)

Arguments

network

Input network

names

set of node-names to which to add annotations.

color

Color to attach to the added annotation.

default

Set a default annotation for this name to all nodes.

annot_name

Annotation name to attach to the nodes.

annot_value

and the associated value.

Value

a new network!


elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.