Cluster R
Cluster R
R
Administrator
2024-03-29
##
## Attaching package: 'dplyr'
library(cluster)
library(factoextra)
library(readxl)
# Load dataset
mark5827_T1_24_Ass_2 <- read_excel("C:/Users/Administrator/Downloads/mark5827 T1_ 24 Ass 2.xls")
head(mark5827_T1_24_Ass_2)
## # A tibble: 6 × 21
## ID Year_Birth Kidhome Teenhome Dt_Customer MntWines MntFruits
## <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <dbl>
## 1 5524 1957 0 0 21/11/2020 1587 2024
## 2 2174 1954 1 1 25/05/2022 253 23
## 3 5324 1981 1 0 7/04/2022 3979 989
## 4 965 1971 0 1 30/01/2021 5405 1495
## 5 6177 1985 1 0 25/07/2021 1748 230
## 6 387 1976 0 0 30/01/2021 138 368
## # ℹ 14 more variables: MntMeatProducts <dbl>, MntFishProducts <dbl>,
## # MntSweetProducts <dbl>, MntOtherProds <dbl>, NumStorePurchases <dbl>,
## # NumDealsPurchases <dbl>, NumWebPurchases <dbl>, NumCatalogPurchases <dbl>,
## # NumWebVisitsMonth <dbl>, AcceptedCmp2 <dbl>, AcceptedCmp1 <dbl>,
## # AcceptedCmp3 <dbl>, AcceptedCmp4 <dbl>, AcceptedCmp5 <dbl>