Disable Interactive Visuals in R

Viewed 11

I am interested in using some visuals from a package called `aweSOM.' https://cran.r-project.org/web/packages/aweSOM/vignettes/aweSOM.html

Very nice visuals. However, it just so happens that there are certain instances when I'd like to switch off the interactiveness of these visuals.

https://rdrr.io/cran/aweSOM/src/R/aweSOM.R

I've attached below some sample code. Would be appreciated if anyone knew how to disable the visual given the link above.


library(aweSOM)
full.data <- iris
train.data <- full.data[, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")]
train.data <- scale(train.data)
set.seed(1465)
init <- somInit(train.data, 4, 4)
iris.som <- kohonen::som(train.data, grid = kohonen::somgrid(4, 4, "hexagonal"), 
                         rlen = 100, alpha = c(0.05, 0.01), radius = c(2.65,-2.65), 
                         dist.fcts = "sumofsquares", init = init)

superclust_pam <- cluster::pam(iris.som$codes[[1]], 3)
superclasses_pam <- superclust_pam$clustering

####PLOT####

aweSOMplot(som = iris.som, type = "Cloud", data = full.data, 
           variables = c("Species", "Sepal.Length", "Sepal.Width",  
                         "Petal.Length", "Petal.Width"), 
           superclass = superclasses_pam)

0 Answers
Related