[adegenet-forum] Randomly subsetting genind object
Zhian Kamvar
zkamvar at gmail.com
Sat Sep 8 12:08:42 CEST 2018
If you are looking to take a random sample of loci, you can just sample them after you read in the data by using the “loc” argument:
myData[loc=sample(nLoc(myData), 13)]
Sent from my iPhone
> Is there a way to randomly sample a subset of my SNP data, say 13 SNPs out of ~3k, in adegenet when I read in a STRUCTURE file?
>
> boot_1 <-
> read.structure(
> ?snps.str",
> onerowperind = TRUE,
> n.ind = 16,
> n.loc = 2468,
> ask = FALSE,
> quiet = TRUE
> )
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20180901/6d387bb2/attachment-0001.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> 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 121, Issue 1
> **********************************************
More information about the adegenet-forum
mailing list