[FLR-list] R bug !?
Mark Payne
mpa at aqua.dtu.dk
Fri Jan 13 14:26:49 CET 2012
R 2.13.0
Platform: x86_64-unknown-linux-gnu (64-bit)
(Mandriva)
> data(iris)
> iris[1,1]<- Inf
>
> # this one should give 1 on the first column ..
> apply(apply(iris,2,is.infinite),2,sum)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
0 0 0 0 0
>
> sum(is.infinite(iris$Sepal.Length))
[1] 1
>
________________________________________
Fra: flr-list-bounces at r-forge.wu-wien.ac.at [flr-list-bounces at r-forge.wu-wien.ac.at] På vegne af Ernesto JARDIM [ernesto.jardim at jrc.ec.europa.eu]
Sendt: 13. januar 2012 14:19
Til: flr-list at flr-project.org
Emne: [FLR-list] R bug !?
I'm afraid of mentioning the word ...
Can you please check the code below on your installations ? It looks a
bug but I'm sure Ripley wrote some where this is a new feature of apply ...
data(iris)
iris[1,1]<- Inf
# this one should give 1 on the first column ..
apply(apply(iris,2,is.infinite),2,sum)
sum(is.infinite(iris$Sepal.Length))
EJ
--
Ernesto Jardim<ernesto.jardim at jrc.ec.europa.eu>
Scientific Officer
FISHREG – Scientific Support to Fisheries
IPSC Maritime Affairs Unit
EC Joint Research Center
TP 051, Via Enrico Fermi 2749
I-21027 Ispra (VA), Italy
Office : +39 0332 785311
Fax: +39 0332 789658
http://fishreg.jrc.ec.europa.eu/
_______________________________________________
flr-list mailing list
flr-list at flr-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list
More information about the flr-list
mailing list