Skip to content

[R-pkg-devel] CRAN pretest WARNING from systemfonts

1 message · Ivan Krylov

#
Dear Azadeh Bayani,

Welcome to R-package-devel and thank you for providing enough
information to diagnose the problem!

? Sat, 28 Feb 2026 15:01:40 +0000
Azadeh Bayani <azadeh.bayani at umontreal.ca> ?????:
The source code of the LABTNSCPSS package contains the following in the
file R/setup_package.R:
If your package needs functions from these packages, it should declare
them in the Imports: field of the DESCRIPTION file and then either use
the fully qualified names of their exported functions (e.g.
data.table::IDateTime) or refer to them by name but then also list them
in the NAMESPACE file (e.g. importFrom(data.table, IDateTime)). If you
really need the packages attached to the global environment (why?), you
can list these packages in Depends:
https://cran.r-project.org/doc/manuals/R-exts.html#Package-Dependencies

Installing and loading packages by hand in your source code will break
when a binary package is built from your source package (among other
things). A binary package contains the contents of the environment in
which your source code was evaluated; it will not contain the calls to
install.packages() and library() themselves. Therefore, the
dependencies will not be installed and the side effects from library()
loading and attaching the packages will also not happen.