networkplot {CluMSID} | R Documentation

## Correlation network from spectral similarity data

### Description

`networkplot()` is used to generate correlation networks from spectral similarity data. An interactive visualisation can be produced using plotly.

### Usage

    networkplot(distmat, interactive = FALSE, show_labels = FALSE,
        label_size = 1.5, highlight_annotated = FALSE,
        min_similarity = 0.1, exclude_singletons = FALSE)

### Arguments

`distmat` | A distance matrix as generated by `distanceMatrix`.
`interactive` | Logical, defaults to `FALSE`. If `TRUE`, an interactive visualisation is generated using plotly.
`show_labels` | Logical, defaults to `FALSE`. If `TRUE`, feature IDs are printed as labels in the network plot. Argument has no effect if `interactive` is `TRUE` (because in this case, labels are displayed on mouse-over).
`label_size` | Numeric, defaults to `1.5`. If `show_labels` is `TRUE` and `interactive` is `FALSE`, `label_size` defines the size of labels in the plot.
`highlight_annotated` | Logical, defaults to `FALSE`. If `TRUE`, points for features for which an annotation was added before using `distanceMatrix` are highlighted by red colour, while other points are grey in the network plot.
`min_similarity` | Numeric, defaults to `0.1`. The minimum spectral contrast angle (see`cossim`) that is considered a spectral similarity and hence a connection in the network.
`exclude_singletons` | Logical, defaults to `FALSE`. If `TRUE`, features that have no connection to any other feature will not be displayed in the network plot.

### Value

A network plot generated with the help of `network`, `ggnet2` and, if interactive, `ggplotly`. Edge weights correspond to spectral similarities.

### Examples

    load(file = system.file("extdata",
        "distmat.RData",
        package = "CluMSIDdata"))

    networkplot(distmat[1:50,1:50], show_labels = TRUE,
                    exclude_singletons = TRUE)

[Package CluMSID version 1.2.1 Index]