DisplayGraph {BNArray}R Documentation

Display network graph

Description

Display network from its named adjacent matrix

Usage

DisplayGraph(graph.matrix, colname.vec)

Arguments

graph.matrix an adjacent matrix
colname.vec the name of the adjacent matrix colnames(rownames)

Details

Directed network graph is displayed from its corresponding adjacent matrix with column and rownames. M[i,j]=1 denotes the node j is a parent of node i in graph G. Otherwise, M[i,j]=0.

Value

No return value.

Author(s)

Xiaohui Chen cxh1984@interchange.ubc.ca,
Kaida Ning aprilnkd@hotmail.com,
Ming Chen mchen@zju.edu.cn.

Examples

        m<-matrix(0,5,5)
        m[1,2:5]<-1
        m[2,3:5]<-1
        m[3,4:5]<-1
        m[4,5]<-1
        rownames(m)<-paste("G",1:5,sep="")
        colnames(m)<-paste("G",1:5,sep="")

        DisplayGraph(m,rownames(m))


[Package BNArray version 1.0 Index]