#' Visualization of clustering
#'
#' This function takes input from emb() to plot the dot plot to
#' visualize the clusters.
#'
#' @param input An object from emb().
#' @return Dot plots.
#' @import ggplot2 ggpubr
#' @export cplot
cplot <- function(input) {
p1 <- ggplot(input) + geom_point(aes(x=EmbedSOM2, y=EmbedSOM1), shape = 20)
p2 <- ggplot(input) + geom_point(aes(x=EmbedSOM2, y=EmbedSOM1, col=as.factor(Metacluster)), shape = 20) + theme(legend.position = "bottom", axis.title.y = element_blank())
ggpubr::ggarrange(p1, p2, ncol = 2, common.legend = T, legend = "bottom")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.