add.edges: Add Edges To A Graph

Description Usage Arguments Examples

View source: R/tools.R

Description

This function adds edges to a previously learned graph.

Usage

1
2
3
4
5
6
7
add.edges(
  g,
  new.edges,
  new.genes = TRUE,
  to = c("igraph", "adjacency", "edges", "graph", "bnlearn"),
  from = c("auto", "adjacency", "edges", "graph", "igraph", "bnlearn")
)

Arguments

g

Graph object.

new.edges

New edges to be added (dataframe with at least two columns: 'from' and 'to').

new.genes

New genes (nodes) will also be included. Otherwise, only edges of nodes already present in the network will be taken into account. Default: TRUE

to

Output format (optional): 'adjacency', 'edges', 'graph', 'igraph', or 'bnlearn'. Default: 'igraph'

from

Input format (optional): 'auto', 'adjacency', 'edges', 'graph', 'igraph', or 'bnlearn'. Default: 'auto'

Examples

1
g <- add.edges(g, new.edges)

rlebron-bioinfo/gnlearn documentation built on July 25, 2020, 12:38 p.m.