if (FALSE) {
# This imports all functions implemented in backports while the package is loaded
.onLoad <- function(libname, pkgname) {
backports::import(pkgname)
}
# This only imports the function "trimws"
.onLoad <- function(libname, pkgname) {
backports::import(pkgname, "trimws")
}
# This imports all backports from base and force-imports "hasName" from utils
.onLoad <- function(libname, pkgname) {
backports::import(pkgname)
backports::import(pkgname, "hasName", force = TRUE)
}
}
Run the code above in your browser using DataLab