[Rd] Spurious warning in as.data.frame.factor()
Hervé Pagès
hp@ge@@on@g|thub @end|ng |rom gm@||@com
Tue Mar 12 20:33:17 CET 2024
Hi,
The acrobatics that as.data.frame.factor() is going thru in order to
recognize a direct call don't play nice if as.data.frame() is an S4
generic:
df <- as.data.frame(factor(11:12))
suppressPackageStartupMessages(library(BiocGenerics))
isGeneric("as.data.frame")
# [1] TRUE
df <- as.data.frame(factor(11:12))
# Warning message:
# In as.data.frame.factor(factor(11:12)) :
# Direct call of 'as.data.frame.factor()' is deprecated. Use
'as.data.frame.vector()' or 'as.data.frame()' instead
This spurious warning showed up on the recent Bioconductor daily build
reports after we've updated the build machines to the latest R devel.
It's causing some confusion and breaks at least one unit test.
Thanks,
H.
> sessionInfo()
R Under development (unstable) (2024-03-06 r86056)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS
Matrix products: default
BLAS: /home/biocbuild/bbs-3.19-bioc/R/lib/libRblas.so
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: America/New_York
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] BiocGenerics_0.49.1
loaded via a namespace (and not attached):
[1] compiler_4.4.0
--
Hervé Pagès
Bioconductor Core Team
hpages.on.github using gmail.com
[[alternative HTML version deleted]]
More information about the R-devel
mailing list