cluster_terms {simplifyEnrichment} | R Documentation

## Cluster functional terms

### Description

Cluster functional terms

### Usage

    cluster_terms(mat, method = "binary_cut", control = list(), catch_error = FALSE,
        verbose = TRUE)

### Arguments

`mat` | A similarity matrix.
`method` | Method for clustering the matrix.
`control` | A list of parameters passed to the corresponding clustering function.
`catch_error` | Internally used.
`verbose` | Whether to print messages.

### Details

The following methods are the default:

`kmeans`

  see `cluster_by_kmeans`.

`dynamicTreeCut`

  see `cluster_by_dynamicTreeCut`.

`mclust`

  see `cluster_by_mclust`.

`apcluster`

  see `cluster_by_apcluster`.

`hdbscan`

  see `cluster_by_hdbscan`.

`fast_greedy`

  see `cluster_by_igraph`.

`leading_eigen`

  see `cluster_by_igraph`.

`louvain`

  see `cluster_by_igraph`.

`walktrap`

  see `cluster_by_igraph`.

`MCL`

  see `cluster_by_MCL`.

`binary_cut`

  see `binary_cut`.

Also the user-defined methods in `all_clustering_methods` can be used here.

New clustering methods can be registered by `register_clustering_methods`.

Please note it is better to directly call `cluster_terms` for clustering while not the individual `cluster_by_*` functions because `cluster_terms` does additional cluster label adjustment.

### Value

A numeric vector of cluster labels (in numeric).

If `catch_error` is set to `TRUE` and if the clustering produces an error, the function returns a `try-error` object.

### Examples

    # There is no example
    NULL

[Package simplifyEnrichment version 1.4.0 Index]