generate_g {DiffCorr}R Documentation

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
)

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)

Value

igraph object

Author(s)

Atsushi Fukushima

Examples

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

[Package DiffCorr version 0.4.3 Index]