nodeScores {BioNetStat} | R Documentation

## Node scores

### Description

Node score (degree, betweenness, closenness, eigenvector centralities or clustering coefficient) for each network analysed.

### Usage

    degreeCentrality(expr, labels, adjacencyMatrix)

    betweennessCentrality(expr, labels, adjacencyMatrix)

    betweennessEdgesCentrality(expr, labels, adjacencyMatrix)

    closenessCentrality(expr, labels, adjacencyMatrix)

    eigenvectorCentrality(expr, labels, adjacencyMatrix)

    clusteringCoefficient(expr, labels, adjacencyMatrix)

### Arguments

`expr` | Matrix of variables (columns) vs samples (rows).
`labels` | a vector in which a position indicates the phenotype of the corresponding sample or state.
`adjacencyMatrix` | a function that returns the adjacency matrix for a given variables values matrix.

### Value

a list of vector containing the node scores (degree, betweenness, closenness, eigenvector centralities or clustering coefficient) of each network.

### Examples

    set.seed(1)
    expr <- as.data.frame(matrix(rnorm(120),40,30))
    labels<-data.frame(code=rep(0:3,10),names=rep(c("A","B","C","D"),10))
    adjacencyMatrix1 <- adjacencyMatrix(method="spearman", association="pvalue",
     threshold="fdr", thr.value=0.05, weighted=FALSE)

    # Degree centrality
    degreeCentrality(expr, labels, adjacencyMatrix1)

    # Betweenness Centrality
    betweennessCentrality(expr, labels, adjacencyMatrix1)

    # Edges Betweenness Centrality
    betweennessEdgesCentrality(expr, labels, adjacencyMatrix1)

    # Closenness Caentrality
    closenessCentrality(expr, labels, adjacencyMatrix1)

    # Eigenvector centrality
    eigenvectorCentrality(expr, labels, adjacencyMatrix1)

    # Clustering coefficient
    clusteringCoefficient(expr, labels, adjacencyMatrix1)

[Package BioNetStat version 1.12.0 Index]