Title: | Reimplementations of Functions Introduced Since R-3.0.0 |
---|---|
Description: | Functions introduced or changed since R v3.0.0 are re-implemented in this package. The backports are conditionally exported in order to let R resolve the function name to either the implemented backport, or the respective base version, if available. Package developers can make use of new functions or arguments by selectively importing specific backports to support older installations. |
Authors: | Michel Lang [cre, aut] , Duncan Murdoch [aut], R Core Team [aut] |
Maintainer: | Michel Lang <[email protected]> |
License: | GPL-2 | GPL-3 |
Version: | 1.5.0 |
Built: | 2024-12-10 03:10:58 UTC |
Source: | https://github.com/r-lib/backports |
Functions introduced or changed since R v3.0.0 are re-implemented in this package. The backports are conditionally exported in order to let R resolve the function name to either the implemented backport, or the respective base version, if available. Package developers can make use of new functions or arguments by selectively importing specific backports to support older installations.
Maintainer: Michel Lang [email protected] (ORCID)
Authors:
Duncan Murdoch [email protected]
R Core Team
Useful links:
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.
import(pkgname, obj = NULL, force = FALSE)
import(pkgname, obj = NULL, force = FALSE)
pkgname |
[ |
obj |
[ |
force |
[ |
## 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)
## 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)