<p>You are summing up true and falses. So there is an implicit conversion from logical to numeric.<br>
I&#39;m with Ripley (believe it or not) on this one.<br>
To do it explicitly you could use function(x) sum(ifelse(x,1,0)))<br>
Laurie</p>
<div class="gmail_quote">On Jan 13, 2012 2:10 PM, &quot;Ernesto JARDIM&quot; &lt;<a href="mailto:ernesto.jardim@jrc.ec.europa.eu">ernesto.jardim@jrc.ec.europa.eu</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;m afraid of mentioning the word ...<br>
<br>
Can you please check the code below on your installations ? It looks a bug but I&#39;m sure Ripley wrote some where this is a new feature of apply ...<br>
<br>
data(iris)<br>
iris[1,1]&lt;- Inf<br>
<br>
# this one should give 1 on the first column ..<br>
apply(apply(iris,2,is.<u></u>infinite),2,sum)<br>
<br>
sum(is.infinite(iris$Sepal.<u></u>Length))<br>
<br>
EJ<br>
<br>
-- <br>
Ernesto Jardim&lt;<a href="mailto:ernesto.jardim@jrc.ec.europa.eu" target="_blank">ernesto.jardim@jrc.ec.<u></u>europa.eu</a>&gt;<br>
Scientific Officer<br>
FISHREG – Scientific Support to Fisheries<br>
IPSC Maritime Affairs Unit<br>
EC Joint Research Center<br>
TP 051, Via Enrico Fermi 2749<br>
I-21027 Ispra (VA), Italy<br>
Office : <a href="tel:%2B39%200332%20785311" value="+390332785311" target="_blank">+39 0332 785311</a><br>
Fax: <a href="tel:%2B39%200332%20789658" value="+390332789658" target="_blank">+39 0332 789658</a><br>
<a href="http://fishreg.jrc.ec.europa.eu/" target="_blank">http://fishreg.jrc.ec.europa.<u></u>eu/</a><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
flr-list mailing list<br>
<a href="mailto:flr-list@flr-project.org" target="_blank">flr-list@flr-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list" target="_blank">https://lists.r-forge.r-<u></u>project.org/cgi-bin/mailman/<u></u>listinfo/flr-list</a><br>
</blockquote></div>