
The data set refers to clients of a wholesale distributor. It includes the annual spending in monetary units on diverse product categories.
data(wholesale)
A data frame containing 440 observations in 8 variables (6 numerical and two categorical). The variables are as follows:
Region
Customers' Region - Lisbon (coded as 1), Porto (coded as 2) or Other (coded as 3)
Fresh
Annual spending on fresh products
Milk
Annual spending on milk products
Grocery
Annual spending on grocery products
Frozen
Annual spending on frozen products
Detergents
Annual spending on detergents and paper products
Delicatessen
Annual spending on and delicatessen products
Channel
Customers' Channel - Horeca (Hotel/Restaurant/Café) or
Retail channel. Horeca is coded as 1 and Retail channel is coded as 2
#--- EXAMPLE 1 ------------------------------------------
data (wholesale)
x <- wholesale[, -c(1, ncol(wholesale))]
clus <- tclust(x, k=3, alpha=0.1, nstart=200, niter1=3, niter2=17,
nkeep=10, opt="HARD", equal.weights=FALSE, restr.fact=50, trace=TRUE)
plot (x, col=clus$cluster+1)
plot(clus)
Run the code above in your browser using DataLab