library(cluster)
library(factoextra)
library(reshape2)
library(ggplot2)
library(complex)
data = read.table("output.txt", skip = 1)
rownames(data)=data$V1
data = data[,-1]
colnames(data)=rownames(data)
dists = dist(data)
fviz_dist(dists)
n_clusters <- fviz_nbclust(data, cluster::clara, method = "silhouette", k.max = 30)
cl.res <- clara(data, 7)
fviz_cluster(cl.res, data=data, ellipse.type = "convex", palette = "jco", repel = TRUE)
hc = hclust(dists)
fviz_dend(hc)
data$names=rownames(data)
data.m <- melt(data, id.vars = c("names"))
ggplot(data.m, aes(variable , names)) + geom_tile(aes(fill=factor(value)), colour = "white") + scale_x_discrete(limits=sort(names(data)))+scale_y_discrete(limits=sort(names(data)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.