if (FALSE) {
#--------------
# data.frame
#--------------
# default call on data.frame
visHclust(iris, cutree = 3, colorEdges = "red")
# update some parameters
visHclust(iris, cutree = 3, tooltipColumns = c(1, 5),
colorGroups = c("red", "blue", "green"), horizontal = TRUE)
# no graphics on tooltip
visHclust(iris, cutree = 3, tooltipColumns = NULL,
main = "Hclust on iris")
# Title(s)
visHclust(iris, cutree = 3, main ="My_title",
submain = "My_sub_title", footer = "My_footer")
# Export
visHclust(iris, cutree = 3, export = TRUE)
# update group / individual nodes
visHclust(iris, cutree = 8) %>%
visGroups(groupname = "group", color ="black",
shape = "triangleDown", size = 75) %>%
visGroups(groupname = "individual",
font = list(size = 150),
color = list(background = "white", border = "purple",
highlight = "#e2e9e9", hover = "orange"), shape = "box")
#--------------
# dist
#--------------
# without adding data & info in tooltip
visHclust(dist(iris[,1:4]), cutree = 3)
# adding data & info in tooltip
visHclust(dist(iris[,1:4]), cutree = 3, data = iris)
#--------------
# hclust
#--------------
# without adding data & info in tooltip
visHclust(hclust(dist(iris[,1:4])), cutree = 3)
# adding data & info in tooltip
visHclust(hclust(dist(iris[,1:4])), cutree = 3, data = iris)
}
Run the code above in your browser using DataLab