<br>When reading a nexml-formatted tree with reticulated nodes (i.e. a network), I&#39;m getting an error while constructing the phylo4 tree that the number of tips doesn&#39;t match the number of tip labels.&nbsp; This is stemming from check_phylo4, which checks that nTips(object) is equal to length(tip.label) -- but I can&#39;t find the code for nTips (here is a snippet of my debugging session within check_phylo4; there are only 5 tips, but nTips reports 6):<br>
<br>Browse[1]&gt; nTips(object)<br>[1] 6<br>Browse[1]&gt; object@tip.label<br>[1] &quot;Homo sapiens&quot; &quot;t3&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;t2&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;t5&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;t4&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>Browse[1]&gt; getMethod(&quot;nTips&quot;, where=object)<br>
Method Definition:<br><br>function (x, ...) <br>{<br>&nbsp;&nbsp;&nbsp; .local &lt;- function (x) <br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (class(x) == &quot;phylo&quot;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ntip(x)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else stop(paste(&quot;no &#39;nTips&#39; method available for&quot;, deparse(substitute(x)), <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;(class&quot;, class(x), &quot;)&quot;))<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; .local(x, ...)<br>}<br>&lt;environment: 0x861e04c&gt;<br><br>Signatures:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x&nbsp;&nbsp;&nbsp; <br>target&nbsp; &quot;ANY&quot;<br>defined &quot;ANY&quot;<br>
<br>