Questions tagged [factoextra]

factoextra is an R package making easy to extract and visualize the output of exploratory multivariate data analyses, including PCA , CA, MCA, MFA, HMFA and FAMD

factoextra is a R package, written by Alboukadel Kassambara, is an R package for visualizing the output of exploratory multivariate data analyses. It extracts analysis results from various R packages for principal component analysis and can generate ggplot2-based plots. Also it contains functions facilitating clustering analysis and visualization.

Repositories

books

70 questions
0
votes
0 answers

clustering.. error with function "fviz_nbclust()"

I'm trying to determine the number of cluters (elbow method and silhouette and gap statistic method) with function fviz_nbclust knowing that at this point I'm only reproducing an example I found on Rpubs.com thanks in advance for your help I tried…
fifi_ny
  • 1
  • 1
  • 2
0
votes
1 answer

factoextra variable plotting and labeling subset

I've run a PCA using prcomp in R and I am trying to produce a variable plot that has 1) a subset of the variables (arrows) in a different color (black) than the rest of the variables, 2) sort those variables prior to plotting so the black arrows…
Alex
  • 261
  • 2
  • 5
  • 11
0
votes
0 answers

When I do a Correspondence Analysis using R it comes an error

When I do a Correspondence Analysis using R it comes an error like this picture It plot a picture when I use the same fviz_ca_biplot method and the All4 data with more columns(8 columns, cross gender and age). This time I use just gender that has…
0
votes
0 answers

Add some labels on a clustering plot with Factoextra and FactoMineR

I am a beginner at FactoMineR and factoextra, and I don't know how to add some labels in the result plot of my HCPC. This is my code : library(FactoMineR) library(factoextra) X<-read.table('C:/.../Bus.txt', sep='\t', header=TRUE,…
JC_
  • 33
  • 4
0
votes
0 answers

cluster results using factoextra package fviz_dend() to draw a wrong result

Here is my data spe.ch.method: spe.ch.method <- structure(list(merge = structure(c(-7L, -38L, -19L, -6L, -13L, -2L, -8L, -23L, -36L, -10L, -29L, -25L, -16L, -3L, -35L, -22L, -32L, 4L, 12L, -9L, 16L, -14L, 10L, 3L, -26L, 18L, -21L, 20L, 24L, 15L,…
PeterPanPan
  • 151
  • 4
0
votes
1 answer

Why do I get different clustering between FactoMineR and factoextra packages in R given I use the same metric and method?

I am doing agglomerative hierarchical clustering (AHC) using two R packages, FactoMineR and factoextra after doing PCA on the dataset, and I end up having a discrepancy in at least one cluster membership but it could more than one had other datasets…
doctorate
  • 1,381
  • 1
  • 19
  • 43
0
votes
1 answer

How do you filter out individuals on a figure after creating a PCA plot in Factoextra?

I am a research student coming to grips with R for the first time. I am trying to make a PCA plot from a series of body measurements, the specimens names and a subspecies tag (BIN) are in sperate columns. The BIN column contains the BIN ID for each…
0
votes
0 answers

FactorMiner plot.HCPC function for cluster labeling

This is the function that is part of FactorMiner package https://github.com/cran/FactoMineR/blob/master/R/plot.HCPC.R As an example this is the code I ran res.pca <- PCA(iris[, -5], scale = TRUE) hc <- HCPC(res.pca, nb.clust=-1,) plot.HCPC(hc,…
kcm
  • 200
  • 3
  • 13
0
votes
2 answers

How to highlight a particular variable or individual in a PCA space in R

I am currently working on a large dataset (count data with species x samples) from which I performed a PCA. What I get is a massive cloud of points, and I would like to color one given species to show where it is located in this cloud (species are…
Droidux
  • 146
  • 2
  • 12
0
votes
0 answers

PCA - All variables with same signal on PC1 coordinates

So, I am analyzing a dataset that consists of 160 observations and 20 variables and am performing a PCA. It is about patients affected by a disease and the variables are antibodies levels measured in the same experiment and the values are on the…
0
votes
0 answers

How to make labels clearer in factoextra::fviz_cluster plot

I've plotted this cluster plot factoextra::fviz_cluster(clustsub.k2,clustsub, pointsize = 1.2 ,labelsize = 12) clustsub.k2 And this is the result: How do I make the labels clearer? I can't read any of the numbers.
andie
  • 45
  • 2
0
votes
0 answers

How to use images as the "shape" of the points in a graph in ggplot2?

I'm making a graph of a PCA in R using morphological data of distinct fishes and I'm using the package "factoextra" to make this plot. I runned the following code: fviz_pca_ind(pca, axes = c(1:2), geom.ind = "point", pointshape = 21, …
0
votes
1 answer

The values in a fviz_cluster figure do not correspond with the datapoints of the dataset

I have composed the following script for a clustered scatter plot with fviz_cluster. According to the plot, there are negative values for x and negative values for y. dots <- dots %>% select(GRNHLin, RED2HLin) dots <- dots %>% …
LiWa
  • 51
  • 2
0
votes
1 answer

Warnings when transforming to logarithmic scale, a lot of NaNs produced

For a few weeks, I have used the following script to produce a scatterplot with approximately 10,000 (non-zero, positive) datapoints. Only few (<20) datapoints were not included because of warnings with the transformation. visual <-…
LiWa
  • 51
  • 2
0
votes
0 answers

Error when transforming a scale gives and infinite value, both on y-axis and x-axis

For making a scatterplot of a flow cytometry experiment, I used the following code for the last few weeks. While running the code, I did not receive a significant amount of errors (only 20 out of 10,000 entries were removed from the dataset). visual…
LiWa
  • 51
  • 2