[adegenet-forum] sPCA screeplot

Jombart, Thibaut t.jombart at imperial.ac.uk
Tue Jun 26 11:50:58 CEST 2012


Hello, 

this is because the original object used in the sPCA is needed by summary to compute variance and autocorrelation statistics, and is probably no longer in the environment by the time you call 'summary'. Make sure the object, with its original name, is still present in the environment. If you saved it as a R object, use 'load(myObject.RData)' to load it.

Cheers

Thibaut


________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Moussy, Caroline [cm323 at exeter.ac.uk]
Sent: 25 June 2012 20:19
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] sPCA screeplot

Dear all,

My dataset consists of 699 individuals sampled at 36 locations (colonies) and genotyped at 10 microsatellites. I have uploaded my dataset in a STRUCTURE format and performed a DAPC analysis on the genind object.
I wanted to compare these results with results from a sPCA on the genpop object using Delauney triangulation as connection network.
When calling for the spca plot, the connection network, 3 x score 1 and eigenvalues plots are displayed but the spatial and variance components of the eigenvalues plot doesn’t appear.

When calling for it separately using screeplot, it doesn’t come up either.
I get the following error message:
Error in apply(X, 2, f1) : object 'X' not found

The same message appears when calling for the summary of the spca.


> delauney<-spca(pop,ask=F,type=1,scannf=F,nfposi=2,nfnega=0) #select 2 axes for positive, 0 negative

> plot(delauney)

Error in apply(X, 2, f1) : object 'X' not found

> screeplot(delauney)

Error in apply(X, 2, f1) : object 'X' not found

> summary(delauney)



Spatial principal component analysis



Call: spca(obj = pop, scannf = F, nfposi = 2, nfnega = 0, type = 1,

    ask = F)

Error in apply(X, 2, f1) : object 'X' not found

The same issue occurs when I used other connection networks.

I am at loss trying to figure out what went wrong and how I could obtain the screeplot. Would anyone be able to help?

Thanks a lot.

Caro

Caroline Moussy
PhD Spatial ecology of the serotine bat

Centre for Ecology and Conservation
University of Exeter
Tremough campus
Penryn
Cornwall
TR10 9EZ
UK




More information about the adegenet-forum mailing list