> library(tm)
Loading required package: NLP
> library(cluster)
Warning message:
package ‘cluster’ was built under R version 3.5.3 
> library(proxy)

Attaching package: ‘proxy’

The following objects are masked from ‘package:stats’:

    as.dist, dist

The following object is masked from ‘package:base’:

    as.matrix

Warning message:
package ‘proxy’ was built under R version 3.5.3 
> load("tdm.rdata")
> tdm_r <- removeSparseTerms(tdm, 0.60)
> dis_mat <- dist (scale(tdm_r))
> set <- hclust (dist_mat, method = "ward")
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
Error in hclust(dist_mat, method = "ward") : object 'dist_mat' not found
> set <- hclust (dis_mat, method = "ward")
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
> plot (set)
> rect.hclust (set, k=4, border = "gold")
Error in rect(m[which[n]] + 0.66, par("usr")[3L], m[which[n] + 1] + 0.33,  : 
  plot.new has not been called yet
> plot (set)
> rect.hclust (set, k=4, border = "gold")
> rect.hclust (set, k=3, border = "red")
> plot (set)
> rect.hclust (set, k=3, border = "red")
> dist_mat <- dist (tdm_r, method = "euclidian")
Error in .get_entry_index(name, stop_if_missing) : 
  Entry “euclidian” not in registry.
> dist_mat <- dist (tdm_r, method = "eucledian")
Error in .get_entry_index(name, stop_if_missing) : 
  Entry “eucledian” not in registry.
> dist_mat <- dist (tdm_r, method = "euclidean")
Error in x - y : non-numeric argument to binary operator
> 
