knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
database <- 'db_name'
server <- "server_name"
library(cluster)
library(factoextra)
library(dendextend)
suppressPackageStartupMessages(library(dendextend))
df <- na.omit(df)
head(df)
df_1 <- dist(df, method = "euclidean")
hc1 <- hclust(df_1, method = "complete")
plot(hc1, cex = 0.6, hang = -8)
rect.hclust(hc1, k = 4, border = 2:5)
I tried to run this code but instead I get the error:
Error in as.vector(x, mode) : cannot coerce type 'closure' to vector of type 'any'