Learn R Programming

DiffCorr (version 0.4.4)

generate_g: Generating graph from data matrix

Description

Generating graph from data matrix

Usage

generate_g(
  data,
  method = "pearson",
  cor.thr = 0.6,
  neg.flag = 1,
  node.col = "red",
  node.size = 7,
  edge.col = "blue",
  edge.width = 3
)

Value

igraph object

Arguments

data

data matrix or data frame

method

c("Pearson", "Spearman", "Kendall")

cor.thr

a threshold of correlation coefficient (default: r >= 0.6)

neg.flag

flag where uses or not negative correlations

node.col

specifies color of nodes in a graph (default: red)

node.size

specifies size of nodes in a graph (default: 7)

edge.col

specifies color of edges in a graph (default: blue)

edge.width

specifies width of edges in a graph (default: 3)

Author

Atsushi Fukushima

Examples

Run this code
library(igraph)
mat <- matrix(runif(100), nr=10)
rownames(mat) <- as.character(1:10)
generate_g(mat)

Run the code above in your browser using DataLab