<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Sheena,<div class=""><br class=""></div><div class="">The solution to your question is the following (change "dat" to whatever you named your genind):</div><div class=""><br class=""></div><div class="">loci_to_keep <- nAll(dat) < 3</div><div class="">trimmed_dat <- dat[loc = loci_to_keep]</div><div class=""><br class=""></div><div class="">The reason why this works:</div><div class=""><br class=""></div><div class="">nAll() gives you the number of alleles per locus in your genind object. The vector loci_to_keep is a logical vector specifying which loci have fewer than three alleles. When used with the loc subsettor for the genind object, it will remove all the loci where the corresponding entry in loci_to_keep is FALSE.</div><div class=""><br class=""></div><div class="">Hope that helps,</div><div class="">Zhian</div><div class=""><br class=""></div><div class=""><div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">-----</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Zhian N. Kamvar, Ph. D.</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Postdoctoral Researcher (Everhart Lab)</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Department of Plant Pathology</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">University of Nebraska-Lincoln</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">ORCID: 0000-0003-1458-7108</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div></div></div><div><blockquote type="cite" class=""><div class=""><div class=""><br class="">Date: Tue, 21 Nov 2017 11:49:36 +0200<br class="">From: sheena talma <<a href="mailto:sheenatalma@gmail.com" class="">sheenatalma@gmail.com</a>><br class="">To: <a href="mailto:adegenet-forum@lists.r-forge.r-project.org" class="">adegenet-forum@lists.r-forge.r-project.org</a><br class="">Subject: [adegenet-forum] Removing Non-biallelic samples<br class="">Message-ID: <<a href="mailto:8F2E6BCC-85AA-4DFC-ACF0-1454F1B9A2C0@gmail.com" class="">8F2E6BCC-85AA-4DFC-ACF0-1454F1B9A2C0@gmail.com</a>><br class="">Content-Type: text/plain;<span class="Apple-tab-span" style="white-space:pre"> </span>charset=us-ascii<br class=""><br class="">Hi,<br class=""><br class="">I am new to R and programming.<br class=""><br class="">Does any one know whether there is a way to remove non- biallelic SNPs using R?<br class=""><br class="">Thanks<br class=""><br class="">Sheena<br class=""><br class="">------------------------------<br class=""><br class="">_______________________________________________<br class="">adegenet-forum mailing list<br class=""><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" class="">adegenet-forum@lists.r-forge.r-project.org</a><br class="">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum<br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>