[adegenet-forum] data input

Vojtěch Zeisek vojta at trapa.cz
Fri Nov 28 11:16:38 CET 2014


Hello

Dne Pá 28. listopadu 2014 10:04:23, Mark Coulson napsal(a):
> Hello,
> 
> Apologies for the simple question but I have imported a genepop file into
> adegenet (although couldn't do this via 'read.genepop', instead had to use
> 'import2genind'. My individuals are labelled as POPNAME_1, POPNAME_2, and
> it correctly identifies both the population name as well as the individual
> identifier. However, how do I add in something to the @other slot. For
> example, I'd like to classify each of the populations as to which river
> they belong to.

Would something like
YourData$other <- YourSortingVariable
do the job?
YourSortingVariable should have length as number of individuals in YourData 
(genind object) and it should be a factor, e.g.:
YourSortingVariable <- c("Danube", "Danube", "Moldau", "Moldau", ...)
There is also slot pop (YourData$pop) which is used to store population 
information and some functions can directly use it.
HTH,
Vojtěch

-- 
Vojtěch Zeisek
http://trapa.cz/en/

Department of Botany, Faculty of Science
Charles University in Prague
Benátská 2, Prague, 12801, CZ
http://botany.natur.cuni.cz/en/

Institute of Botany, Academy of Science
Zámek 1, Průhonice, 25243, CZ
http://www.ibot.cas.cz/en/

Czech Republic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20141128/aa6af337/attachment.sig>


More information about the adegenet-forum mailing list