R/netplot.R

Defines functions netplot

Documented in netplot

#This file belongs to
#c3net: C3NET, <https://r-forge.r-project.org/projects/c3net/>
#This R package allows inferring regulatory networks from expression data using C3NET.
#The inferred network consists of only direct physical interactions.
## Copyright (C) January 2011 Gokmen Altay <altayscience@gmail.com>
## This program is a free software for only academic useage but not for commercial useage; you can redistribute it and/or
## modify it under the terms of the GNU GENERAL PUBLIC LICENSE
## either version 3 of the License, or any later version.
##
## This program is distributed WITHOUT ANY WARRANTY; 
## You can get a copy of the GNU GENERAL PUBLIC LICENSE
## from
## http://www.gnu.org/licenses/gpl.html
## See the licence information for the dependent package from
## igraph package itself.


netplot <- function(gnet)
{
gnet[gnet!=0]<-1

x <- graph.adjacency(gnet, mode="undirected", diag=FALSE)
y <- get.edgelist(x)
z <- graph.edgelist(y,directed=FALSE)
V(z)$label <- V(z)$name

tkplot(z)
}

Try the c3net package in your browser

Any scripts or data that you put into this service are public.

c3net documentation built on June 24, 2022, 5:07 p.m.