[adegenet-forum] df2genind function unexpected behavior

Tagliamonte,Massimiliano S mstagliamonte at ufl.edu
Tue Jan 3 22:03:02 CET 2017


Dear Dr. Jombart,


I am currently trying to perform a sPCA, and I have noticed something unexpected while formatting my datasets.

I have used the function df2genind, then tried to add the spatial data using the command:


my_genind_obj$other$xy<- my_dataframe[,c('X','Y')]  #X and Y are the utm coordinate columns;


When checking that the data were imported correctly though, I realized that the coordinates were sorted in the same order than the original dataframe; the isolates themselves though (my_genind_obj$table) were sorted in some other way (it seemed alphanumerical, but isolate names starting with "X" were put before the ones starting with "P"). I guess this breaks the correlation between each isolate and its location. My isolate names are aplhanumeric, and the names starting with "X" also contain dots (e.g. "X.14.4.555)". Am I missing something? Is there a better way to attach the spatial information so to keep correlation between different pieces of information?

I am using adegenet v.2.0.1 on Windows 7.

Thank you for your kind attention,


Massimiliano S. Tagliamonte
Graduate Student
University of Florida
College of Veterinary Medicine
Department of Infectious Diseases and Pathology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170103/f3387f80/attachment.html>


More information about the adegenet-forum mailing list