[adegenet-forum] redefining populations and excluding populations
Zhian Kamvar
zkamvar at gmail.com
Fri Aug 5 19:04:16 CEST 2016
For the populations, you can also use the pop argument in the brackets.
The previous example would look like this:
y <- microbov[pop = !popNames(microbov) %in% "Salers"]
You can also use strings or integers.
- Zhian
> Date: Fri, 5 Aug 2016 12:47:38 +0100
> From: Thibaut Jombart <thibautjombart at gmail.com>
> To: Mark Coulson <Mark.Coulson.ic at uhi.ac.uk>
> Cc: "adegenet-forum at lists.r-forge.r-project.org"
> <adegenet-forum at lists.r-forge.r-project.org>
> Subject: Re: [adegenet-forum] redefining populations and excluding
> populations
> Message-ID:
> <CANPRA+oLiq534F-+7-Qs_QE3kZc5_oB+7WfYuGuqs8_fywoy6w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi there,
>
> most handling is documented:
> adegenetTutorial("basics")
>
> section 5.1. See also the manpage for most accessors:
> ?nLoc
>
> For instance, to exclude the Salers from microbov:
> x <- microbov[i=!as.character(pop(microbov)) %in% c("Salers")]
>
> Cheers
> Thibaut
>
>
> --
> Dr Thibaut Jombart
> Lecturer, Department of Infectious Disease Epidemiology
> Imperial College London
> https://sites.google.com/site/thibautjombart/
> https://github.com/thibautjombart
> Twitter: @TeebzR <https://twitter.com/TeebzR>
>
> On 5 August 2016 at 09:15, Mark Coulson <Mark.Coulson.ic at uhi.ac.uk> wrote:
>
>> I have a genind file with an @pop factor however based on various cluster
>> analysis I have redefined 4 groups (instead of the initial 12). I want to
>> assign this grouping factor to my genind object and then eliminate one of
>> the groups for subsequent analysis (presumably using the poppr package).
>> How do I go about this?
>>
>>
>> Inverness College UHI, a partner in the University of the Highlands and
>> Islands www.inverness.uhi.ac.uk Board of Management of Inverness College
>> (known as Inverness College UHI), Scottish Charity No SC021197.
>>
>> _______________________________________________
>> 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
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160805/33a31c36/attachment.html>
>
> ------------------------------
>
> _______________________________________________
> 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
>
> End of adegenet-forum Digest, Vol 96, Issue 7
> *********************************************
More information about the adegenet-forum
mailing list