download this code from this link:http://data03.online/
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1 5.1 3.5 1.4 0.2 setosa
## 2 4.9 3.0 1.4 0.2 setosa
## 3 4.7 3.2 1.3 0.2 setosa
## 4 4.6 3.1 1.5 0.2 setosa
## 5 5.0 3.6 1.4 0.2 setosa
## 6 5.4 3.9 1.7 0.4 setosa
## 'data.frame': 150 obs. of 5 variables:
## $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ...
## $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ...
## $ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ...
## $ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 ...
## $ Species : Factor w/ 3 levels "setosa","versicolor",..: 1 1 1 1 1 1 1 1 1 1 ...
## [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
## [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 3 3 3 1 3 3 3 3 3 3 3 3 1 3 3 3 3 1 3 3 3
## [75] 3 1 1 1 3 3 3 3 3 3 3 1 1 3 3 3 3 3 3 3 3 3 3 3 3 3 1 3 1 1 1 1 3 1 1 1 1
## [112] 1 1 3 3 1 1 1 1 3 1 3 1 3 1 1 3 1 1 1 1 1 1 3 3 1 1 1 3 1 1 1 3 1 1 1 3 1
## [149] 1 3
## Sepal.Length Sepal.Width Petal.Length Petal.Width
## 1 1.13217737 0.08812645 0.9928284 1.0141287
## 2 -1.01119138 0.85041372 -1.3006301 -1.2507035
## 3 -0.05005221 -0.88042696 0.3465767 0.2805873
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
## # A tibble: 3 × 7
## Sepal.Length Sepal.Width Petal.Length Petal.Width size withinss cluster
## <dbl> <dbl> <dbl> <dbl> <int> <dbl> <fct>
## 1 1.13 0.0881 0.993 1.01 47 47.5 1
## 2 -1.01 0.850 -1.30 -1.25 50 47.4 2
## 3 -0.0501 -0.880 0.347 0.281 53 44.1 3
## # A tibble: 1 × 4
## totss tot.withinss betweenss iter
## <dbl> <dbl> <dbl> <int>
## 1 596 139. 457. 2
##
## setosa versicolor virginica
## 1 0 11 36
## 2 50 0 0
## 3 0 39 14
## [1] 0.09333333
##
## Attaching package: 'dbscan'
## The following object is masked from 'package:stats':
##
## as.dendrogram