<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {mso-style-name:msochpdefault;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif";}
span.emailstyle17
        {mso-style-name:emailstyle17;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>This work well. Thank you. <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Jombart, Thibaut [mailto:t.jombart@imperial.ac.uk] <br><b>Sent:</b> 15 July 2015 16:33<br><b>To:</b> LAWAL RAMAN; adegenet-forum@lists.r-forge.r-project.org<br><b>Subject:</b> RE: NA.REPLACE<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Hi there, <br><br>yes, na.replace has been removed in adegenet 2.0.0. <br><br>Instead, you can use:<br>tab(x, NA.method="mean")<br><br>where 'x' is your genind. If you want frequencies, you will need to add 'freq=TRUE'. See ?tab, and the basics tutorial for more info on data handling:<br><a href="https://github.com/thibautjombart/adegenet/wiki/Tutorials" target="_blank">https://github.com/thibautjombart/adegenet/wiki/Tutorials</a><br><br>Cheers<br>Thibaut<o:p></o:p></span></p><div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'><o:p> </o:p></span></p></div></div></div></div><div><div class=MsoNormal align=center style='text-align:center'><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:black'><hr size=2 width="100%" align=center></span></div><div id=divRpF376537><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'> <a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org">adegenet-forum-bounces@lists.r-forge.r-project.org</a> [adegenet-forum-bounces@lists.r-forge.r-project.org] on behalf of Raman Lawal [plxral@nottingham.ac.uk]<br><b>Sent:</b> 15 July 2015 15:08<br><b>To:</b> <a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.r-project.org</a><br><b>Subject:</b> [adegenet-forum] NA.REPLACE</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:black'><o:p></o:p></span></p></div><div><div><p class=MsoNormal><span class=apple-converted-space><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black;background:white'>I have tried to prepare all necessary files but wanted to remove the NA using the na.replace option of the ade4 as seen in command below. When I ran </span></span><span style='color:black'>test<- na.replace(genind_ABCDEFGH,"mean", quiet=FALSE), I get “Error: could not find function "na.replace". I am not certainly sure what I was doing wrong. Could you please advise me on what to do.<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>library(adegenet)<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>datan<- as.numeric(data4)<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>pop<-data4@phdata$pop<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>genind_ABCDEFGH<-as.genind(datan,pop)<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>rm(data4)<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>rm(datan)<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>#rm(pop)<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>library(ade4)<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>## Replacing NAs<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>test<- na.replace(genind_ABCDEFGH,"mean", quiet=FALSE)<o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:black'> LAWAL<o:p></o:p></span></p></div><pre><span style='color:black'>This message and any attachment are intended solely for the addressee<o:p></o:p></span></pre><pre><span style='color:black'>and may contain confidential information. If you have received this<o:p></o:p></span></pre><pre><span style='color:black'>message in error, please send it back to me, and immediately delete it. <o:p></o:p></span></pre><pre><span style='color:black'><o:p> </o:p></span></pre><pre><span style='color:black'>Please do not use, copy or disclose the information contained in this<o:p></o:p></span></pre><pre><span style='color:black'>message or in any attachment.  Any views or opinions expressed by the<o:p></o:p></span></pre><pre><span style='color:black'>author of this email do not necessarily reflect the views of the<o:p></o:p></span></pre><pre><span style='color:black'>University of Nottingham.<o:p></o:p></span></pre><pre><span style='color:black'><o:p> </o:p></span></pre><pre><span style='color:black'>This message has been checked for viruses but the contents of an<o:p></o:p></span></pre><pre><span style='color:black'>attachment may still contain software viruses which could damage your<o:p></o:p></span></pre><pre><span style='color:black'>computer system, you are advised to perform your own checks. Email<o:p></o:p></span></pre><pre><span style='color:black'>communications with the University of Nottingham may be monitored as<o:p></o:p></span></pre><pre><span style='color:black'>permitted by UK legislation.<o:p></o:p></span></pre></div></div></div></div><PRE>


This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
</PRE></body></html>