Entering edit mode
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)
> anyis.na(x))
[1] TRUE
> base::anyNA(x)
[1] TRUE
> genefilter::anyNA(x)
[1] FALSE
base man page says:
"The generic function ?anyNA? implements ?anyis.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
It's now two years on. Could the two functions be removed from genefilter now?