[FLR-list] R bug !?

Ernesto JARDIM ernesto.jardim at jrc.ec.europa.eu
Fri Jan 13 15:11:54 CET 2012


Hhmmm, it can't be around for so long ... I'm missing something here. We 
had a similar problem with "as.numeric" during the R course.

On 01/13/2012 02:26 PM, Mark Payne wrote:
> 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&#229; 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
> _______________________________________________
> flr-list mailing list
> flr-list at flr-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list


-- 
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/





More information about the flr-list mailing list