xBiproject: Function to obtain a projected graph from a bipartitle graph

Description Usage Arguments Value Note See Also Examples

View source: R/xBiproject.r

Description

xBiproject is supposed to obtain a projected graph from a bipartitle graph.

Usage

1
xBiproject(g, verbose = TRUE)

Arguments

g

an object of class "igraph" (or "graphNEL") for a bipartitel graph with a 'type' node attribute

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to true for display

Value

It returns an igraph object.

Note

The input graph will has an equal weight if there is no 'weight' edge attribute associated with

See Also

xBiproject

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 1) generate a random bipartite graph
set.seed(123)
g <- sample_bipartite(100, 50, p=0.05)
V(g)$name <- V(g)

## Not run: 
# 2) obtain its projected graph
ig <- xBiproject(g)

# 3) estimate pairwise affiinity between nodes
mat <- xRWkernel(ig)

## End(Not run)

hfang-bristol/XGR documentation built on Sept. 23, 2018, 3:25 p.m.