#Using datasets to find distance matrix
#Applying hierarchical clustering
------------------------------------------- --
d <- dist(as.matrix(mtcars))
hc <- hclust(d)
plot(hc)
----------------------------------------------
d <- dist(as.matrix(euro))
hc <- hclust(d)
plot(hc)
----------------------------------------------
d <- dist(as.matrix(Orange))
hc <- hclust(d)
plot(hc)
----------------------------------------------
#Package for marketing and micro-econometrics applications.
install.packages("bayesm")
library("bayesm")
library(bayesm)
data(rivers)
str(rivers)
#Applying hierarchical clustering
------------------------------------------- --
d <- dist(as.matrix(mtcars))
hc <- hclust(d)
plot(hc)
----------------------------------------------
d <- dist(as.matrix(euro))
hc <- hclust(d)
plot(hc)
----------------------------------------------
d <- dist(as.matrix(Orange))
hc <- hclust(d)
plot(hc)
----------------------------------------------
#Package for marketing and micro-econometrics applications.
install.packages("bayesm")
library("bayesm")
library(bayesm)
data(rivers)
str(rivers)
No comments:
Post a Comment