Learn R Programming

clustNet (version 1.2.0)

plot_clusters: plot_clusters

Description

Plot clusters

Usage

plot_clusters(
  cluster_results,
  node_colours = "#fdae61",
  scale_entropy = FALSE,
  directed = TRUE
)

Value

A summary plot of all cluster networks of class c("gg", "ggplot", "ggarrange").

Arguments

cluster_results

Cluster results

node_colours

node colours

scale_entropy

if true, entropy measure will be used to determine size of the nodes

directed

TRUE if nodes should be directed

Examples

Run this code
# \donttest{
# Simulate data
sampled_data <- sampleData(n_vars = 15, n_bg = 0)$sampled_data
# learn clusters
cluster_results <- get_clusters(sampled_data)
# Load additional pacakges to visualize the networks
library(ggplot2)
library(ggraph)
library(igraph)
library(ggpubr)
# Visualize networks
plot_clusters(cluster_results)
# }

Run the code above in your browser using DataLab