Thanks for the answer. Sorry, but I didn't understand how an executable script can be. I don't know if I asked correctly, but I intend to make an .exe file that when when I double click on the file, it will run the script and apply the desired functions. In my case I would like to show the graph
This is the script:
#database
df <-structure (list (Latitude = c (-23.8, -23.8, -23.9, -23.9, -23.9, -23.9, -23.9, -23.9, -23.9, -23.9, -23.9, -23.9, -23.9 , -23.9, -23.9, -23.9, -23.9, -23.9, -23.9), Longitude = c (-49.6, -49.6, -49.6, -49.6, -49.6, -49.6, -49.6, -49.6, -49.6, - 49.6, -49.7, -49.7, -49.7, -49.7, -49.7, -49.6, -49.6, -49.6, -49.6), Waste = c (526, 350, 526, 469, 285, 175, 175, 350, 350, 175 , 350, 175, 175, 364, 175, 175, 350, 45.5, 54.6)), class = "data.frame", row.names = c (NA, -19L))
Q1 <-matrix (quantile (df $ Waste, probs = 0.25))
df_Q1 <-subset (df, Waste> Q1 [1])
#cluster
d <-dist (df_Q1)
fit.average <-hclust (d, method = "average")
clusters <-cutree (fit.average, k = 4)
plot (clusters)