[adegenet-forum] pop argument

Jombart, Thibaut t.jombart at imperial.ac.uk
Fri Aug 24 14:54:35 CEST 2012


you need to use 'pop(x) <- ...' to change or set population information; for instance, using simulated data:

> x <- glSim(10,100)
> pop(x)
 [1] A A A A A B B B B B
Levels: A B
> pop(x) <- rep(1:2, c(2,8))
> pop(x)
 [1] 1 1 2 2 2 2 2 2 2 2
Levels: 1 2



From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Tom Devitt [tommydevitt at gmail.com]
Sent: 24 August 2012 13:25
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] pop argument

Could someone please help me understand how to include population information using the pop argument for a genlight object? I've used the read.DNA argument to input my data (FASTA format) and then the fasta2genlight argument to extract SNPs. I don't know how to specify individual population assignments using the pop argument. Thanks for your help.

(Sorry if this is a repost - I tried sending this message a couple days ago, but am not sure it posted to the forum.)
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org

More information about the adegenet-forum mailing list