adjacencyMatrix: Adjacency matrix

Description Usage Arguments Value Examples

View source: R/net_inference.R

Description

creates a function that infers a graph from variables values matrix

Usage

1
2
3
4
5
6
7
8
adjacencyMatrix(
  method,
  association = "none",
  threshold = "none",
  thr.value = 0.05,
  weighted = TRUE,
  abs.values = TRUE
)

Arguments

method

a function that measures the association between the variables values.

association

a charactere string indicating wich value will be used as association value. The options are "corr" for the correlation value, "pvalue" for nominal pvalue associated to correlation or "fdr" for corrected pvalue for mutiple tests.

threshold

a charactere string indicating wich value will be used as threshold value. The options are "corr" for the correlation value, "pvalue" for nominal pvalue associated to correlation or "fdr" for corrected pvalue for mutiple tests. If NULL, no edge is removed.

thr.value

a numeric value. The function removes all edges weighted by a value less than or equal to 'thr.value'.

weighted

a logical value. If TRUE, then the edges of the graph are weighted by the association degrees between the variables. Otherwise, the edges are are weighted by one.

abs.values

a logical value. If TRUE, then the negatives edges of the graph are changed by its absolutes values. Otherwise, the negative edges are kept with negative weights.

Value

a function that creates an adjacency matrix from variable values data.

Examples

1
2
3
4
5
set.seed(3)
expr <- as.data.frame(matrix(rnorm(120),40,30))
labels<-rep(0:3,10)
functionAdjacencyMatrix <- adjacencyMatrix(method="spearman", association="pvalue",
 threshold="fdr", thr.value=0.05, weighted=FALSE)

BioNetStat documentation built on Feb. 3, 2021, 2:01 a.m.