makeClustM: Make an adjacency matrix for a cluster graph

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/makeClustM.R

Description

This function takes a vector of cluster sizes and returns an adjacency matrix for a graph in which edges connect nodes if they are members of the same cluster.

Usage

1
makeClustM(nvec)

Arguments

nvec

A vector of cluster sizes

Value

A square adjacency matrix with the number of rows and columns equal to the sum of nvec. An entry of "1" in the ith row and jth column indicates that node i and node j are members of the same cluster. All other entries are "0".

Author(s)

Denise Scholtens

References

Balasubramanian, et al. (2004) A graph theoretic approach to integromics - integrating disparate sources of functional genomics data.

See Also

clust2Mat

Examples

1
a <- makeClustM(c(2,3,4))

Example output

Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

GraphAT documentation built on Nov. 8, 2020, 5:01 p.m.

Related to makeClustM in GraphAT...