makeNetwork: Create graph from source and target vectors

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Graph.R

Description

Function to create a graph in graphNEL or igraph format from a source and a target vector.

Usage

1
makeNetwork(source, target, edgemode="undirected", format=c("graphNEL", "igraph"))

Arguments

source

Vector of source nodes.

target

Vector of corresponding target nodes.

edgemode

For an "undirected" or "directed" network.

format

Graph format, eiter graphNEL or igraph.

Value

A graph object.

Author(s)

Marcus Dittrich

See Also

loadNetwork.sif, saveNetwork

Examples

1
2
3
source <- c("a", "b", "c", "d")
target <- c("b", "c", "a", "a")
graph <- makeNetwork(source, target, edgemode="undirected")

Example output

Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: RBGL

BioNet documentation built on Nov. 8, 2020, 5:48 p.m.