Learn R Programming

ROntoTools (version 2.0.0)

setNodeWeights: Set node weights

Description

Set node weights

Usage

setNodeWeights(graphList, weights = NULL, defaultWeight = 1)

Arguments

graphList
a list of graph (e.g., graphNEL) objects
weights
named vector or matrix; if vector, the node is going to have the same weight in all graphs it appears; if matrix, the rows represent nodes and columns represent graphs and the node will have different weights in each pathway
defaultWeight
the default weight for all nodes not set by the parameter weights

Value

The graphList with the node weights set.

Examples

Run this code

# load the set of pathways
kpg <- keggPathwayGraphs("hsa")

kpg <- setNodeWeights(kpg)

nodeWeights(kpg[["path:hsa04110"]])


Run the code above in your browser using DataLab