# NOT RUN {
library(ggplot2)
iris_unique <- unique(iris) # Remove duplicates
data <- as.matrix(iris_unique[,1:4])
Rphenograph_out <- Rphenograph(data, k = 45)
igraph::modularity(Rphenograph_out[[2]])
igraph::membership(Rphenograph_out[[2]])
iris_unique$phenograph_cluster <- factor(igraph::membership(Rphenograph_out[[2]]))
ggplot(iris_unique, aes(x=Sepal.Length, y=Sepal.Width, col=Species, shape=phenograph_cluster)) +
geom_point(size = 3)+theme_bw()
# }
Run the code above in your browser using DataLab