[BioC] base R and genefilter have opposite definitions of anyNA()

Sonali Arora sarora at fhcrc.org
Tue May 20 18:53:53 CEST 2014


Hi  Michael,

I have just deprecated genefilter::anyNA and genefilter::allNA in the 
devel branch.
(Version: 1.47.5 of genefilter)

On 5/20/2014 6:52 AM, Michael Love wrote:
> hi,
>
> anyNA() has been added to base R, but the definition is the opposite
> of genefilter::anyNA, which can be dangerous obviously. of course,
> there is also the issue of legacy code.
>
>> x <- c(1:3,NA)
>> any(is.na(x))
> [1] TRUE
>> base::anyNA(x)
> [1] TRUE
>> genefilter::anyNA(x)
> [1] FALSE
>
> base man page says:
> "The generic function ‘anyNA’ implements ‘any(is.na(x))’ in a possibly
> faster way (especially for atomic vectors)."
>
> genefilter man page says:
> "‘anyNA’ evaluates to ‘FALSE’ if any of the elements of its argument are ‘NA’."
>
> Here is a thread about adding anyNA() to base R
> https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15239
>
>> sessionInfo()
> R version 3.1.0 (2014-04-10)
> Platform: x86_64-apple-darwin12.5.0 (64-bit)
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] genefilter_1.46.0
>
> loaded via a namespace (and not attached):
>   [1] annotate_1.42.0      AnnotationDbi_1.26.0 Biobase_2.24.0
>   [4] BiocGenerics_0.10.0  DBI_0.2-7            GenomeInfoDb_1.0.2
>   [7] IRanges_1.22.3       parallel_3.1.0       RCurl_1.95-4.1
> [10] RSQLite_0.11.4       splines_3.1.0        stats4_3.1.0
> [13] survival_2.37-7      XML_3.98-1.1         xtable_1.7-3
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
Thanks and Regards,
Sonali



More information about the Bioconductor mailing list