rbartpackages.base.require_r_package¶
- rbartpackages.base.require_r_package(library, min_version)[source]¶
Load an R package’s namespace, requiring a minimum version.
The wrappers track the current release of each R package; a wrapper module calls this at import time to declare the oldest version it supports, so that an older installation fails immediately with a legible message instead of at some arbitrary later point.
- Parameters:
- Raises:
ValueError – If
libraryis not a valid R identifier, ormin_versionis not a valid R version.ImportError – If the installed
libraryis older thanmin_version.
Examples
- Return type:
>>> require_r_package('dbarts', '0.9-34')