R/plotG.R

Defines functions plotG

Documented in plotG

plotG <-
function(X,vertex_size=15,vertex_color="green",vertex_frame_color="green",vertex_label_cex=1, edge_width=3){
 
   try(if( is.matrix(X)==FALSE)stop("X is not a matrix"))
  column<-dim(X)[[1]]
  diag(X) <- 0
  X[X!=0]=1
  adjacency.plot <- graph.adjacency(X, mode='undirected')
  pl<-plot(adjacency.plot,vertex.size=vertex_size,vertex.color=vertex_color,vertex.frame.color=vertex_frame_color,vertex.label.cex=vertex_label_cex, edge.width=edge_width)
}

Try the GLSE package in your browser

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

GLSE documentation built on May 2, 2019, 6:34 a.m.