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
1
vote
1 answer

Rotating labels within a dendrogram object and changing the default dendrogram colour (R)

I am hoping to accomplish two things. I want to be able to rotate the labels. The fviz_dend function is compatible with ggplot2 theme function but I am not entirely sure how to accomplish it. I would like to change the line colour of the…
1
vote
1 answer

Change colour of supplementary column using factoextra in R

I am trying to change the colour used for the supplementary column in a correspondence analysis using fviz_ca_col() from the package factoextra, but I do not seem to get any response when changing the colour from the default col.col.sup =…
humperderp
  • 241
  • 1
  • 11
1
vote
1 answer

How do I label only a subset of points in a biplot?

I am generating biplots using fviz_pca_biplot in factoextra. The following code provides an example of my datset and the biplots. I'd like to label a subset of points, rather than all of them. For example, only species in a single genus like…
1
vote
1 answer

biplot in R labeling by two variables?

Hello I have a multivariate dataset I performed a PCA over my scaled data and used fviz_pca_biplot() function for displaying a biplot. this is a example of what I did: (example with mtcars) colnames(mtcars) "mpg" "cyl" "disp" "hp" "drat" "wt" …
Valentin
  • 399
  • 2
  • 10
1
vote
1 answer

How add labels to the PCA plot from my dataframe

I have a dataset and want to run a PCA plot. In this plot the observations should be grouped in the same colour based on name column (habillage = a$name). Additionally, I want that single observation shows to which group it corresponds in terms of…
John Mayer
  • 103
  • 7
1
vote
1 answer

Trouble visualizing K-means clusters with fviz_clusters()

Currently trying to visualize k-means clusters and running in to a bit of trouble. I'm getting this error message when I run the code below: Error in fviz_cluster(res.km, data = nci[, 5], palette = c("#2E9FDF", : The dimension of the data < 2!…
Kyle
  • 155
  • 2
  • 9
1
vote
1 answer

Error in `row.names<-.data.frame`(`*tmp*`, value = value) : duplicate 'row.names' are not allowed

I using PCA function of R to study the principal components analysis. This is to make the question reproducible: > dput(DATA_FINAL[1:50,]) structure(list(DataCRMSanoflore.Year_Sales = c(2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
Rprogrammer
  • 457
  • 2
  • 6
  • 19
1
vote
1 answer

PCA biplot group individuals

I have many individuals in my data (n=600). I run a PCA and would like to create a Biplot of variables and individuals. I'd like the variables coloured by their contribution. These individuals come from two groups and I'd like to colour the points…
Tzac
  • 101
  • 2
  • 12
1
vote
0 answers

Custom labels using ade4 and factoextra packages

I want to make and plot PCA with ade4 package and then customize with factoextra. It works very well with both packages until I realize my biplot with factoextra, I don't know how to customize labels. I would only know if somebody can help me with…
1
vote
1 answer

factoextra: jitter labels to avoid overplotting

Since factoextra uses the ggplot2 plotting system, is there a way to adjust the positioning of text labels (jitter), in order to avoid overlapping? # install.packages("devtools","FactoMineR") # library("devtools") #…
Brani
  • 6,454
  • 15
  • 46
  • 49
0
votes
0 answers

Customized plotting of PCA results in R

I have calculated PCA scores and loadings using SPSS software. Now I want to generate biplot like fviz_pca_biplot function of factoextra package. I am using the following code library(FactoMineR) library(factoextra) library(tidyverse) #Plot scores…
UseR10085
  • 7,120
  • 3
  • 24
  • 54
0
votes
0 answers

How to compute variable contributions to the principal axes for RDA in R? (Erorr: rdacca can't be handled by factoextra)

data("mite") # Load mite species abundance data data("mite.env") # Load envdata # Hellinger transform the community data mite.spe.hel <- decostand(mite, method = "hellinger") mite.env <- mite.env[,1:2] mite.env$SoilCont <-…
Share
  • 395
  • 7
  • 19
0
votes
0 answers

> library("factoextra") Error in library("factoextra") : there is no package called ‘factoextra’

I've been trying to install the package factoextra to do pca plots. However, when I try to install the packages it says it is already installed and it asks me to restart the r session. Then when I'm trying to load the library it says >…
0
votes
0 answers

repel function using the ggrepel package

How to get around with this error when repel = TRUE function is added to a PCA? fviz_pca_var( PCA_Variables, col.var = "cos2", gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"), geom = c("point", "text"), labelsize = 3, repel = TRUE, …
0
votes
1 answer

Using theme() from ggplot2 with the factoextra package to change aesthics of biplot made

I made a successful biplot using the factoextra package (fviz_pca_biplot()), but I want to change the size of the axis labels and titles as well as changing the color of the axis lines using ggtheme theme(). I used this code and nothing changes…
Kayla
  • 3
  • 1