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> ?????:
These warnings appear to originate from systemfonts (and its bundled agg code), which is being compiled during installation.
The source code of the LABTNSCPSS package contains the following in the file R/setup_package.R:
# Install packages if not installed
install_if_missing <- function(packages) {
new_packages <- packages[
!(packages %in% installed.packages()[,"Package"])
]
if (length(new_packages)) install.packages(new_packages)
}
# List of required packages
required_packages <- c("usethis", "devtools", "tidyr", "data.table",
"glue", "plyr", "reshape2", "dplyr", "tidyr", "openxlsx", "lubridate")
# Install missing packages
install_if_missing(required_packages)
# Load required packages
lapply(required_packages, library, character.only = TRUE)
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.
Best regards, Ivan