Closed lvclark closed 2 years ago
I ran spca on a matrix object containing my genotypes, but when I run summary or screeplot I get the error
spca
summary
screeplot
Error in apply(X, 2, f1) : object 'X' not found
The issue seems to be here: https://github.com/thibautjombart/adegenet/blob/master/R/spca.R#L422
If the original object is not genind or genpop, no X object is created.
genind
genpop
X
Thank you for bringing this up! Can you provide a MWE that I can use to fix and test this or if you have an idea of how you would fix this, would you want to create a PR?
Sure, PR incoming!
I ran
spca
on a matrix object containing my genotypes, but when I runsummary
orscreeplot
I get the errorThe issue seems to be here: https://github.com/thibautjombart/adegenet/blob/master/R/spca.R#L422
If the original object is not
genind
orgenpop
, noX
object is created.