[BioC] Inconistent behavior with all/any and Rle
Steve Lianoglou
mailinglist.honeypot at gmail.com
Tue Oct 12 04:55:00 CEST 2010
Hi,
I'm not sure what this should actually return. I think I was surprised
that it returned TRUE:
R> all(Rle(rep(FALSE, 0)))
[1] TRUE
R> all(Rle(rep(FALSE, 0)))
[1] TRUE
But ok. Then:
R> any(Rle(rep(FALSE, 0)))
[1] FALSE
R> any(Rle(rep(TRUE, 0)))
[1] FALSE
`any` should be more "permissive" than `all`, shouldn't it? But also,
maybe a 0 length logical Rle should return something else in these
scenarios?
-steve
sessionInfo()
R version 2.13.0 Under development (unstable) (2010-09-21 r52957)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=C
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] IRanges_1.7.39
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the Bioconductor
mailing list