Hierarchical clustering using corclust
Hierarchical clustering using corclust
I am trying to create hierarchical cluster by using corclust function from klaR package in R. The function is trying to pass the values to the hclust function, but it is not accepting the parameters like mincor, method.
code
plot(corclust(iris[,-5],iris[,5],mincor=0.5))
While running the above line am getting the following error.
Error
Error in corclust(iris[, -5], iris[, 5], mincor = 0.5) :
unused argument (mincor = 0.5)
Please let me know how to resolve this error.
2 Answers
2
The error comes up because you are specifying "mincor" as an argument for the corclust
function, which does not use it. Instead just try:
corclust
plot(corclust(iris[,-5]))
That should give you the cluster dendogram. However, the iris dataset after removing the species column contains no factor variables so you might want to try it out with another dataset.
Hope that helps!
Your code has several issues:
mincor
plot
corclust
data.frame
vector
corclust
data.frame
?corclust
corclust
So that gives you:
plot(corclust(iris[,-5]), mincor=0.5)
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.