Hello! I am having another seemingly simple problem – when I try to plot PCA diagrams using plotIndiv() I keep receiving error messages that the values are missing.
I start out by carrying out CLR transformation on filtered and offsetted data:
En.AllGen.clr <- logratio.transfo(as.matrix(En.AllGen.keep), logratio = 'CLR', offset = 0)
Then I carry out PCA and plot the PCA diagram:
En.AllGen.pca <- pca(En.AllGen.clr)
plotIndiv(En.AllGen.pca, group = SampleTypes, ind.names = FALSE, pch = 16, legend = TRUE, title = "Enfield PCA")
SampleTypes
is a factor with 5 levels for the sample types in my study:
> str(SampleTypes)
Factor w/ 5 levels "Control","Crude oil",..: 3 3 4 4 4 2 5 5 1 1 ...
However, I have been consistently getting the following warning messages when I try to plotIndiv() for PCA:
Warning messages:
1: Removed 5 rows containing missing values (geom_point).
2: Removed 1 rows containing missing values (geom_point).
3: Removed 2 rows containing missing values (geom_point).
4: Removed 3 rows containing missing values (geom_point).
5: Removed 2 rows containing missing values (geom_point).
Each index (1 to 5) correspond to the five sample types in my dataset, and each the rows removed refer to the individual samples.
However, I only started encountering this issue after I updated my version of R to V3.6.3, so I am not sure if it is an issue with my code or package/version compatibility. I am still able to reproduce the code without errors if I run the script on my personal computer (I work mainly from my office computer). I’m wondering if this is an issue that you may have encountered before?
Thanks very much for your time.