I'm developing a private/internal package that necessarily imports many other packages across tidyverse and Bioconductor. This package will never be publicly released so I have no concerns about the number of imports. I keep getting the note:
❯ checking package dependencies ... NOTE
Imports includes 21 non-default packages.
Importing from so many packages makes the package vulnerable to any of
them becoming unavailable. Move as many as possible to Suggests and
use conditionally.
I am following the guidance at R Manuals :: R Internals - 8 Tools and R Internals and have these entries in my tools/check.env
file:
_R_CHECK_PKG_SIZES_THRESHOLD_=10
_R_CHECK_EXCESSIVE_IMPORTS_=30
The first suppresses the note about having installed data >5mb, and the second should suppress NOTEs about too many imports (sets the threshold to 30 instead of 20). However, this doesn't seem to work. I still get the note about too many imports (although the first seems to work -- I do not get the note about the package being too large when I include this line).
I've tried going into project options and adding additional arguments to the check command, but this only adds things to the args=
option to devtools::check()
. I've also tried adding these lines to ~/.R/check.Renviron
but this doesn't help either.
> library(devtools)
Loading required package: usethis
> sessionInfo()
R version 4.3.3 (2024-02-29)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.3
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/New_York
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_2.4.5 usethis_2.2.3
loaded via a namespace (and not attached):
[1] vctrs_0.6.5 cli_3.6.2 rlang_1.1.3 stringi_1.8.3 purrr_1.0.2 pkgload_1.3.4
[7] promises_1.2.1 shiny_1.8.0 xtable_1.8-4 glue_1.7.0 htmltools_0.5.7 httpuv_1.6.14
[13] pkgbuild_1.4.3 ellipsis_0.3.2 fastmap_1.1.1 lifecycle_1.0.4 memoise_2.0.1 stringr_1.5.1
[19] compiler_4.3.3 miniUI_0.1.1.1 sessioninfo_1.2.2 fs_1.6.3 htmlwidgets_1.6.4 Rcpp_1.0.12
[25] urlchecker_1.0.1 rstudioapi_0.15.0 later_1.3.2 digest_0.6.34 R6_2.5.1 magrittr_2.0.3
[31] tools_4.3.3 mime_0.12 profvis_0.3.8 remotes_2.4.2.1 cachem_1.0.8
>