Description Usage Arguments See Also Examples
Imports objects from backports into the namespace of other packages by assigning it during load-time. See examples for a code snippet to copy to your package.
1 |
pkgname |
[ |
obj |
[ |
force |
[ |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# 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)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.