[adegenet-forum] sPCA randtest in adegenet devel
Thibaut Jombart
thibautjombart at gmail.com
Thu Oct 5 15:53:01 CEST 2017
Hello David,
can you post an issue on github, attaching the dataset and with the
code to reproduce the error?
Best
Thibaut
--
Dr Thibaut Jombart
Lecturer, Department of Infectious Disease Epidemiology, Imperial College London
Head of RECON: repidemicsconsortium.org
WHO Consultant - outbreak analysis
sites.google.com/site/thibautjombart/
Twitter: @TeebzR
+44(0)20 7594 3658
On 3 October 2017 at 23:47, David Dayan <snook91901 at gmail.com> wrote:
> Hi,
>
> I've been a longtime user of this forum, but never a poster, so first thanks
> to Thibaut and everyone on the team for their work in keeping the forum such
> a useful place.
>
> I'm trying to get to the bottom of an error running the new spca_randtest
> function in the development package.
>
> The error I receive is:
> Error in 1:nrow(obj) : argument of length 0
>
> I looked to see if the the nrow function worked on either the spca object or
> the genind obj that I ran the spca on:
>
>>nrow(oc_spca)
> NULL
>
>>nrow(oc.gid)
> NULL
>
> I also attempted to run spca_randtest on the example spca data, spcaIllus,
> and was successful.
>
> Can anyone venture a guess as to what's happening here? I've copied the
> summary of the spca object below
>
> Thanks,
> David
>
> ########################################
> # spatial Principal Component Analysis #
> ########################################
> class: spca
> $call: spca(obj = oc.gid, xy = xy_oc_jitter)
>
> $nfposi: 2 axis-components saved
> $nfnega: 1 axis-components saved
> Positive eigenvalues: 8.311 6.044 5.207 5.179 4.758 ...
> Negative eigenvalues: -3.39 -3.045 -2.905 -2.848 -2.757 ...
>
> vector length mode content
> 1 $eig 167 numeric eigenvalues
>
> data.frame nrow ncol
> 1 $tab transformed data: optionally centred / scaled $tab
> 2 $c1 10898 3
> 3 $li 113 3
> 4 $ls 113 3
> 5 $as 2 3
> content
> 1 transformed data: optionally centred / scaled
> 2 principal axes: scaled vectors of alleles loadings
> 3 principal components: coordinates of entities ('scores')
> 4 lag vector of principal components
> 5 pca axes onto spca axes
>
> $xy: matrix of spatial coordinates
> $lw: a list of spatial weights (class 'listw')
>
> other elements: NULL
>
> _______________________________________________
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
More information about the adegenet-forum
mailing list