Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor question about Factoextra package #13

Closed
kassambara opened this issue Jun 23, 2016 · 1 comment
Closed

Minor question about Factoextra package #13

kassambara opened this issue Jun 23, 2016 · 1 comment

Comments

@kassambara
Copy link
Owner

@kassambara kassambara commented Jun 23, 2016

First of all, congratulations for this useful package for visualizing clusters

I'm applying it for visualizing an object HCPC (a cluster obtained by HCPC method on an MCA analysis of plant categorical atributes attributes (FactomineR package)) in the way you explain and I have an error message when I try to apply the command fviz_cluster (factoextra package) to the HCPC object that I obtain from MCA (FactomineR package). The error message says:
Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric

When I apply the fviz_cluster (factoextra package) to another HCPC object obtained from PCA (FactomineR package) I have no problems.

What can be the solution for this problem?
Thank you so much

Best regards

Alejandro Juárez-Escario

kassambara added a commit that referenced this issue Jun 23, 2016
@kassambara
Copy link
Owner Author

@kassambara kassambara commented Jun 23, 2016

Thank you for reporting this bug. It's now fixed.

  • Please install the latest version of factoextra from Github as follow:
if(!require(devtools)) install.packages("devtools")
devtools::install_github("kassambara/factoextra")
  • Computing HCPC object from MCA using FactoMineR
# Computing MCA
library("FactoMineR")
data(poison)
res.mca <- MCA(poison[1:55, 5:15], graph=FALSE)

# Computing HCPC
res.hcpc <- HCPC(res.mca, graph = FALSE)

# Default plot
plot(res.hcpc, choice = "map")

rplot15

  • Visualizing HCPC using factoextra
library(factoextra)
fviz_cluster(res.hcpc, repel = TRUE)

rplot

Best,
A.

@kassambara kassambara closed this Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.